Create a GasGuru release for store deployment. Use when the user asks to create a release, bump version, prepare a new version, deploy to stores, or publish a new version. Handles version bumping, whatsnew files, branch creation, and PR.
versions.properties — contains versionCode, versionMajor, versionMinor, versionPatchdistribution/whatsnew/whatsnew-en-US — English changelog (max 4 lines)distribution/whatsnew/whatsnew-es-ES — Spanish changelog (max 4 lines)Ensure develop is up to date:
git checkout develop && git pull
Read versions.properties in develop to get the current version (versionMajor.versionMinor.versionPatch)
Create a bump branch from develop (increment patch by default):
git checkout -b chore/bump-version-X.X.X
Update versions.properties:
versionCode by 1versionPatch by 1versionMajor or versionMinor unless explicitly requestedUpdate whatsnew files:
develop since the last release and identify only user-facing changes:
git log origin/main..develop --oneline | head -40
- Bug fixes and performance improvements- Corrección de errores y mejoras de rendimientoCommit and push, then create a PR to develop:
git add versions.properties distribution/whatsnew/whatsnew-en-US distribution/whatsnew/whatsnew-es-ES
git commit -m "chore: bump version from X.X.X to X.X.X"
git push origin chore/bump-version-X.X.X -u
gh pr create --base develop --title "chore: bump version from X.X.X to X.X.X" --body ""
Do NOT proceed until this PR is merged and develop is pulled again.
Pull develop after the bump PR is merged:
git checkout develop && git pull
Create the release branch from main:
git checkout main && git pull
git checkout -b release/X.X.X
Merge develop keeping develop's changes on conflicts:
git merge develop --strategy-option=theirs
After the merge, always run these cleanup steps:
a) Resolve any pending modify/delete conflicts (files deleted in develop but conflicting):
git status --short | grep "^DU\|^UD" | awk '{print $2}' | xargs -I{} git rm -f {} 2>/dev/null || true
b) Remove files that were deleted in develop but silently kept in the release branch:
MERGE_BASE=$(git merge-base HEAD develop)
git diff "$MERGE_BASE" develop --name-status | grep "^D" | awk '{print $2}' | while read f; do
if [ -f "$f" ]; then
echo "Removing file deleted in develop: $f"
git rm -f "$f"
fi
done
c) Remove files that exist in the release branch (from main) but do NOT exist in develop:
git diff develop HEAD --name-only --diff-filter=A | while read f; do
if [ -f "$f" ]; then
echo "Removing file not present in develop: $f"
git rm -f "$f"
fi
done
If any files were removed in steps (b) or (c), amend the merge commit:
git diff --cached --quiet || git commit --amend --no-edit
Verify the project compiles before continuing:
./gradlew assembleDebug
If the build fails, fix the errors before proceeding. Common causes after a merge:
Push and create PR to main:
git push origin release/X.X.X -u
gh pr create --base main --title "Release - vX.X.X" --body ""
Return the PR URL when done.