feat(bump-pkg): without version, simply update other packages

This commit is contained in:
Julien Fontanet 2020-02-10 15:58:03 +01:00
parent b57d4fdbec
commit 57fa00b765

View File

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