diff --git a/scripts/bump-pkg b/scripts/bump-pkg index 49185f739..81a41199f 100755 --- a/scripts/bump-pkg +++ b/scripts/bump-pkg @@ -4,7 +4,7 @@ set -eu if [ $# -eq 0 ] || [ "$1" = "-h" ] then - echo "Usage: $0 " + echo "Usage: $0 []" exit fi @@ -21,9 +21,13 @@ case "$pkg" in cd "packages/$pkg" esac -npm version "$2" +if [ $# -ge 2 ] +then + npm version "$2" -git add --patch + git add --patch +fi +# if version is not passed, simply update other packages newVersion=$(node --eval 'console.log(require("./package.json").version)')