added check

This commit is contained in:
Core 2022-08-24 07:25:01 +01:00
parent d28c9397f4
commit 9803fd5517
No known key found for this signature in database
GPG key ID: 2AB8327FBA02D1C0

View file

@ -17,6 +17,8 @@ CURRENT_VERSION=$(node -p -e "require('./package.json').version")
if [[ ($CIRCLE_BRANCH == "main" || $GITHUB_REF_NAME == "main") && $COMMIT_SINCE_STABLE -gt 0 ]]; then
NEW_VERSION="${CURRENT_VERSION}-beta.${COMMIT_SINCE_STABLE}"
# Not sure why this is needed, but it is
if [[ $() != $COMMIT_SINCE_STABLE ]]; then
# Update the version in package.json
if [[ $RUNNER_OS == "macOS" ]]; then
sed -i "" -e "s/$CURRENT_VERSION/$NEW_VERSION/" package.json
@ -24,6 +26,7 @@ if [[ ($CIRCLE_BRANCH == "main" || $GITHUB_REF_NAME == "main") && $COMMIT_SINCE_
sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json
fi
echo $NEW_VERSION
fi
else
echo $CURRENT_VERSION
fi