feat(bump-pkg): without version, simply update other packages
This commit is contained in:
parent
b57d4fdbec
commit
57fa00b765
@ -4,7 +4,7 @@ set -eu
|
|||||||
|
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ]
|
if [ $# -eq 0 ] || [ "$1" = "-h" ]
|
||||||
then
|
then
|
||||||
echo "Usage: $0 <package> <version>"
|
echo "Usage: $0 <package> [<version>]"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -21,9 +21,13 @@ case "$pkg" in
|
|||||||
cd "packages/$pkg"
|
cd "packages/$pkg"
|
||||||
esac
|
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)')
|
newVersion=$(node --eval 'console.log(require("./package.json").version)')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user