added check
This commit is contained in:
parent
d28c9397f4
commit
9803fd5517
1 changed files with 9 additions and 6 deletions
|
@ -17,13 +17,16 @@ CURRENT_VERSION=$(node -p -e "require('./package.json').version")
|
||||||
if [[ ($CIRCLE_BRANCH == "main" || $GITHUB_REF_NAME == "main") && $COMMIT_SINCE_STABLE -gt 0 ]]; then
|
if [[ ($CIRCLE_BRANCH == "main" || $GITHUB_REF_NAME == "main") && $COMMIT_SINCE_STABLE -gt 0 ]]; then
|
||||||
NEW_VERSION="${CURRENT_VERSION}-beta.${COMMIT_SINCE_STABLE}"
|
NEW_VERSION="${CURRENT_VERSION}-beta.${COMMIT_SINCE_STABLE}"
|
||||||
|
|
||||||
# Update the version in package.json
|
# Not sure why this is needed, but it is
|
||||||
if [[ $RUNNER_OS == "macOS" ]]; then
|
if [[ $() != $COMMIT_SINCE_STABLE ]]; then
|
||||||
sed -i "" -e "s/$CURRENT_VERSION/$NEW_VERSION/" package.json
|
# Update the version in package.json
|
||||||
else
|
if [[ $RUNNER_OS == "macOS" ]]; then
|
||||||
sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json
|
sed -i "" -e "s/$CURRENT_VERSION/$NEW_VERSION/" package.json
|
||||||
|
else
|
||||||
|
sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json
|
||||||
|
fi
|
||||||
|
echo $NEW_VERSION
|
||||||
fi
|
fi
|
||||||
echo $NEW_VERSION
|
|
||||||
else
|
else
|
||||||
echo $CURRENT_VERSION
|
echo $CURRENT_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue