Skip to content

Commit

Permalink
Merge pull request #2122 from android:rel_branch_script
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 601848832
  • Loading branch information
copybara-androidxtest committed Jan 26, 2024
2 parents a5191c4 + 39ff707 commit dd62f39
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tools/release/create_release_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Script to create a release branch and associated working 'in progress' branch
# TODO: add support for creating a 'stable' branch

set -e

if [[ -n $(git status -s) ]]; then
echo "Error: git directory is not clean; check 'git status'"
exit 1
fi

echo "Syncing main branch"
git remote update
git checkout main
git pull

DATE=$(date -u "+%Y_%m_%d")
RELEASE_BRANCH="axt_${DATE}_release_branch"

echo "Creating $RELEASE_BRANCH"
git checkout -b $RELEASE_BRANCH
git push --set-upstream origin $RELEASE_BRANCH

echo "Creating ${RELEASE_BRANCH}_in_progress"
git checkout -b ${RELEASE_BRANCH}_in_progress

echo "Creating complete. Now do the following steps"
echo "vim build_extensions/axt_versions.bzl"
echo "bash tools/release/validate_and_propagate_versions.sh"
echo "git commit -a -m 'Update artifacts and version numbers for $DATE release'"
echo "git push --set-upstream origin ${RELEASE_BRANCH}_in_progress"
echo "Navigate to https://github.com/android/android-test/compare/${RELEASE_BRANCH}...${RELEASE_BRANCH}_in_progress to create a PR"

0 comments on commit dd62f39

Please sign in to comment.