macos just gotta be weird with sed

This commit is contained in:
Core 2022-08-03 16:49:06 +01:00
parent c114273b2f
commit 81ff59d5dd
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6

View file

@ -17,7 +17,11 @@ fi
echo "Version: $NEW_VERSION"
echo "Current version: $CURRENT_VERSION"
if [[ $COMMITSINCESTABLE -gt 0 ]]; then
sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json
if [[ $RUNNER_OS == "macOS" ]]; then
sed -i "" -e "s/$CURRENT_VERSION/$NEW_VERSION/" package.json
else
sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json
fi
else
echo "Version unchanged, commits since stable is ${COMMITSINCESTABLE}"
fi