From d29a12ba3bfb55ab7356cdeb5da1ddb638963f99 Mon Sep 17 00:00:00 2001 From: Github Actions Date: Sun, 7 Jan 2024 11:40:35 +0200 Subject: [PATCH] w --- bump-version.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bump-version.sh b/bump-version.sh index 854b329..50c8f25 100755 --- a/bump-version.sh +++ b/bump-version.sh @@ -28,16 +28,18 @@ echo "⌗ Bumping to: ${NEW_VERSION}" echo "⌗ Updating CHANGELOG" npm i -g auto-changelog auto-changelog --hide-credit -l 100 -echo "export const SDK_VERSION = '$(echo "${NEW_VERSION}" | sed 's/^v//')'" > src/version.ts +echo "export const SDK_VERSION = \"$(echo "${NEW_VERSION}" | sed 's/^v//')\"" > src/version.ts -echo "📝 Committing to GitHub..." +TARGET_BRANCH=origin/$2 +echo "📝 Committing to GitHub... Target branch: $CURRENT_VERSION" git fetch +git checkout $TARGET_BRANCH git config --global user.email "github-actions@github.com" git config --global user.name "Github Actions" git add package.json CHANGELOG.md src/version.ts git commit --no-verify -m "📦 Release $NEW_VERSION" || exit 1 -git push origin/$2 --no-verify || exit 1 +git push $TARGET_BRANCH --no-verify || exit 1 echo "🎉 Pushed to GitHub ..." # echo "🎉 dry run. branch $current_branch version $NEW_VERSION"