version.sh 333 B

12345678910111213
  1. if [ "$1" ];
  2. then
  3. npm --no-git-tag-version version $1
  4. VERSION=$1
  5. else
  6. npm --no-git-tag-version version patch
  7. VERSION=$(node -p "require('./package.json').version")
  8. fi
  9. npm run changelog
  10. git add .
  11. git commit -m "build: build $VERSION"
  12. git tag $VERSION
  13. echo "\nVersion v$VERSION update succeeded!\n"