Skip to content

Commit a407398

Browse files
fix(release): Manage git state after post-release (#1588)
From [Craft docs](https://github.com/getsentry/craft#post-release-script-conventions): > The script is responsible for any and all `git` state management as `craft` will simply exit after running this script as the final step. This means the script is responsible for committing and pushing any changes that it may have made. Git state isn't managed in the post-release script, meaning changes won't be pushed; this PR manages it.
1 parent 59328b0 commit a407398

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/post-release.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cd $SCRIPT_DIR/..
77
OLD_VERSION="${1}"
88
NEW_VERSION="${2}"
99

10+
git checkout main
1011
GRADLE_FILEPATH="gradle.properties"
1112

1213
# Add a new unreleased entry in the changelog
@@ -37,3 +38,7 @@ VERSION_CODE_PATTERN="buildVersionCode"
3738
VERSION_NUMBER="$( awk "/$VERSION_CODE_PATTERN/" $GRADLE_FILEPATH | grep -o '[0-9]\+' )"
3839
((VERSION_NUMBER++))
3940
sed -ie "s/$VERSION_CODE_PATTERN=.*$/$VERSION_CODE_PATTERN=$VERSION_NUMBER/g" $GRADLE_FILEPATH
41+
42+
git add .
43+
git commit -m "Prepare $new_version"
44+
git push

0 commit comments

Comments
 (0)