Skip to content

Commit

Permalink
fix: can't update package-lock.json (apache#1442)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Nov 17, 2021
1 parent 048b524 commit 81f456c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
rootDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"

lernaVersionArg="$1"
if [[ -z $lernaVersionArg ]]; then
Expand All @@ -19,8 +20,14 @@ tag=v$(node -e "process.stdout.write(require('./lerna.json').version)");
message="chore: publish $tag"

# Update the lock file here
rm "$rootDir/package-lock.json"
npm i --package-lock-only

if [[ $? -ne 0 ]]; then
echo 'Can not update package-lock.json'
exit 1
fi

# Auto-tag and auto-commit like usual
git commit --all -m ${message}
git tag -a ${tag} -m ${tag}
Expand Down

0 comments on commit 81f456c

Please sign in to comment.