Skip to content

Commit

Permalink
Merge branch 'release/25.6' into task/merge-bugfixes-release-25-6
Browse files Browse the repository at this point in the history
  • Loading branch information
kean authored Dec 23, 2024
2 parents cc26fec + c8b5184 commit 24b36d3
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions fastlane/lanes/release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,13 @@
end
end

# This lane publishes a release on GitHub and creates a PR to backmerge the current release branch into the next release/ branch
# This lane publishes a release on GitHub and cleans up the release branch
#
# Note: We deliberately don't create backmerge PRs in this lane, unlike other apps.
# This is because:
# - Backmerge PRs can be problematic when the repo uses squash-merge
# - Release branch changes should already be in the default branch at this point
# For last-minute changes (e.g. due to app rejections), please create eventual backmerge PRs manually.
#
# @param [Boolean] skip_confirm (default: false) If set, will skip the confirmation prompt before running the rest of the lane
#
Expand All @@ -416,16 +422,12 @@
ensure_git_branch_is_release_branch!

version_number = release_version_current

current_branch = release_branch_name(version: version_number)
next_release_branch = release_branch_name(version: release_version_next)

UI.important <<~PROMPT
Publish the #{version_number} release. This will:
- Publish the existing draft `#{version_number}` release on GitHub
- Which will also have GitHub create the associated git tag, pointing to the tip of the branch
- If the release branch for the next version `#{next_release_branch}` already exists, backmerge `#{current_branch}` into it
- If needed, backmerge `#{current_branch}` back into `#{DEFAULT_BRANCH}`
- Delete the `#{current_branch}` branch
PROMPT
unless skip_confirm || UI.confirm('Do you want to continue?')
Expand All @@ -439,11 +441,7 @@
name: version_number
)

create_backmerge_pr

# At this point, an intermediate branch has been created by creating a backmerge PR to a hotfix or the next version release branch.
# This allows us to safely delete the `release/*` branch.
# Note that if a hotfix or new release branches haven't been created, the backmerge PR won't be created as well.
# The `publish_github_release` call should also create a tag, allowing us to safely delete the `release/*` branch.
delete_remote_git_branch!(current_branch)
end

Expand Down

0 comments on commit 24b36d3

Please sign in to comment.