Skip to content

Commit

Permalink
Fix branch naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mvitale1989 committed Nov 24, 2023
1 parent 8650233 commit af8afa0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/bump_build_number.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ if ! git diff --quiet; then
exit 1
fi

log "Saving currently checked out branch"
log "Saving the currently checked out branch"
CURRENT_BRANCH=$(git branch --show-current)
trap "git checkout $CURRENT_BRANCH" EXIT

: ${BRANCH_TO_BUILD:=main}
: ${GIT_LOCAL_BRANCH:=bump-build}
LATEST_BUILD_NUMBER=$(./scripts/get_latest_build_number.sh)
BUILD_NUMBER=$(($LATEST_BUILD_NUMBER + 1))
GIT_LOCAL_BRANCH=bump-build-${BRANCH_TO_BUILD}-${BUILD_NUMBER}
log "Build number to use for the beta build: $BUILD_NUMBER"

log "Creating branch '${GIT_LOCAL_BRANCH}' based on branch '$BRANCH_TO_BUILD'"
Expand All @@ -34,8 +34,9 @@ export BRANCH_TO_BUILD=${BRANCH_TO_BUILD}
export GIT_LOCAL_BRANCH=${GIT_LOCAL_BRANCH}
EOF

log "Running the fastlane branch generation script"
(set -xa && . .env && cd fastlane && bundle exec fastlane set_app_build_number)
log "Running the fastlane build number bumper script"
(. .env && cd fastlane && bundle exec fastlane set_app_build_number)

# TODO implement
# TODO push the ${GIT_LOCAL_BRANCH} branch, and create a PR for it
# TODO put the core-build-engineers as PR reviewers
git branch -l -a

0 comments on commit af8afa0

Please sign in to comment.