Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
update error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Nov 3, 2021
1 parent cf8a6ed commit e47a8ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/lernaVersion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rootDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"

lernaVersionArg="$1"
if [[ -z $lernaVersionArg ]]; then
echo '[ERROR]Please provide argument for "lerna version".'
echo '[ERROR] Please provide argument for "lerna version".'
exit 1
fi

Expand All @@ -31,15 +31,15 @@ isSatisfiedNode=$(node -e "process.stdout.write(require('semver').satisfies('$(n

# Check node and npm version compatible with package.json
if [[ $isSatisfiedNpm != 'true' || $isSatisfiedNode != 'true' ]]; then
echo '[ERROR]node version or npm version is not compatible with package.json'
echo '[ERROR] node version or npm version is not compatible with package.json'
exit 1
fi

# Ignore Lerna's tag and push
lerna version $1 --no-push --no-git-tag-version --yes

if [[ -z $(git diff --stat) ]]; then
echo '[ERROR]No changed packages to version.'
echo '[ERROR] No changed packages to version.'
exit 1
fi

Expand All @@ -52,7 +52,7 @@ rm "$rootDir/package-lock.json"
npm i --package-lock-only

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

Expand Down

0 comments on commit e47a8ed

Please sign in to comment.