-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tooling] Fix hotfix lanes #16880
[Tooling] Fix hotfix lanes #16880
Conversation
…ad redirect to dedicated finalize_hotfix_release lane
…es doc For consistency with how other app's Fastfiles are organized
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
You can trigger an installable build for these changes by visiting CircleCI here. |
extract_release_notes_for_version(version: new_version, | ||
release_notes_file_path: File.join(ENV["PROJECT_ROOT_FOLDER"], 'RELEASE-NOTES.txt'), | ||
extracted_notes_file_path: File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'Resources', 'release_notes.txt')) | ||
extract_release_notes_for_version( | ||
version: new_version, | ||
release_notes_file_path: File.join(PROJECT_ROOT_FOLDER, 'RELEASE-NOTES.txt'), | ||
extracted_notes_file_path: File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'Resources', 'release_notes.txt') | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just formatting and unrelated to the change, sorry for the noise. My IDE kept correcting it so I figured I'd leave it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the right kind of formatting. Thank you for tracking it so future users won't have to 👍
@@ -263,30 +283,33 @@ platform :ios do | |||
##################################################################################### | |||
desc 'Trigger the final release build on CI' | |||
lane :finalize_release do |options| | |||
UI.user_error!('To finalize a hotfix, please use the finalize_hotfix_release lane instead') if ios_current_branch_is_hotfix | |||
|
|||
ios_finalize_prechecks(options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only change in the lines below this one is that when the unless ios_current_branch_is_hotfix
test was removed, the rest of the code got un-indented. You might want to review those lines with "ignore whitespaces" turned on for ease of review.
##################################################################################### | ||
# finalize_hotfix_release | ||
# ----------------------------------------------------------------------------------- | ||
# This lane finalizes the hotfix branch. | ||
# ----------------------------------------------------------------------------------- | ||
# Usage: | ||
# bundle exec fastlane finalize_hotfix_release [skip_confirm:<skip confirm>] | ||
# | ||
# Example: | ||
# bundle exec fastlane finalize_hotfix_release skip_confirm:true | ||
##################################################################################### | ||
desc 'Performs the final checks and tags the hotfix in the current branch' | ||
lane :finalize_hotfix_release do |options| | ||
ios_finalize_prechecks(options) | ||
version = ios_get_app_version | ||
trigger_release_build(branch_to_build: "release/#{version}") | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to lines 253-270 above so it gets closer to the related new_hotfix_release
lane and is following the same lane order than in other app's Fastfiles for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Spatial locality ++
Just saw that since the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Verify that it cut a
release/17.6.1
branch from the17.6
tag
✅
$ git log
* 4ced324bf7 - (HEAD -> release/17.6.1, origin/release/17.6.1) Bump version number (40 seconds ago) Gio Lodi
* 6c1ee71d91 - (tag: 17.6) Bump version number (4 weeks ago) Gio Lodi
Verify that it bumped the version in
Version.internal.xcconfig
,Version.public.xcconfig
andfastlane/Deliverfile
✅
commit 4ced324bf79357cf716469cb1e4f6fc1d8881fad
Author: Gio Lodi <[email protected]>
Date: Tue Jul 20 16:44:59 2021 +1000
Bump version number
diff --git a/config/Version.internal.xcconfig b/config/Version.internal.xcconfig
index 1338f58a1b..403f2ec7b5 100644
--- a/config/Version.internal.xcconfig
+++ b/config/Version.internal.xcconfig
@@ -1,4 +1,4 @@
-VERSION_SHORT=17.6
+VERSION_SHORT=17.6.1
// Internal long version example: VERSION_LONG=9.9.0.20180423
-VERSION_LONG=17.6.0.20210625
+VERSION_LONG=17.6.1.20210720
diff --git a/config/Version.public.xcconfig b/config/Version.public.xcconfig
index c6300f26cb..1a1e3edc7d 100644
--- a/config/Version.public.xcconfig
+++ b/config/Version.public.xcconfig
@@ -1,4 +1,4 @@
-VERSION_SHORT=17.6
+VERSION_SHORT=17.6.1
// Public long version example: VERSION_LONG=9.9.0.0
-VERSION_LONG=17.6.0.5
+VERSION_LONG=17.6.1.0
diff --git a/fastlane/Deliverfile b/fastlane/Deliverfile
index fd9090571d..1c21826917 100644
--- a/fastlane/Deliverfile
+++ b/fastlane/Deliverfile
@@ -5,7 +5,7 @@ screenshots_path "./fastlane/promo-screenshots/"
app_identifier "org.wordpress"
# Make sure to update these keys for a new version
-app_version "17.6"
+app_version "17.6.1"
skip_binary_upload true
overwrite_screenshots true
Run bundle exec
fastlane finalize_release
(reply no when it suggests to update release toolkit). You should get an error telling you that you should use finalize_hotfix_release for hotfix branches instead.
Run
bundle exec fastlane finalize_hotfix_release
and verify that it triggered a release build, and that is is building it from therelease/7.0.1
[17.6.1
? – @mokagio] hotfix branch.
👍 Thanks @AliSoftware
The cherry-pick had conflicts, so I didn't really test the changes in this PR, but my conflict resolution of the changes against the newly create 17.6.1 branch. Still, I think that's good enough.
extract_release_notes_for_version(version: new_version, | ||
release_notes_file_path: File.join(ENV["PROJECT_ROOT_FOLDER"], 'RELEASE-NOTES.txt'), | ||
extracted_notes_file_path: File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'Resources', 'release_notes.txt')) | ||
extract_release_notes_for_version( | ||
version: new_version, | ||
release_notes_file_path: File.join(PROJECT_ROOT_FOLDER, 'RELEASE-NOTES.txt'), | ||
extracted_notes_file_path: File.join(PROJECT_ROOT_FOLDER, 'WordPress', 'Resources', 'release_notes.txt') | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the right kind of formatting. Thank you for tracking it so future users won't have to 👍
##################################################################################### | ||
# finalize_hotfix_release | ||
# ----------------------------------------------------------------------------------- | ||
# This lane finalizes the hotfix branch. | ||
# ----------------------------------------------------------------------------------- | ||
# Usage: | ||
# bundle exec fastlane finalize_hotfix_release [skip_confirm:<skip confirm>] | ||
# | ||
# Example: | ||
# bundle exec fastlane finalize_hotfix_release skip_confirm:true | ||
##################################################################################### | ||
desc 'Performs the final checks and tags the hotfix in the current branch' | ||
lane :finalize_hotfix_release do |options| | ||
ios_finalize_prechecks(options) | ||
version = ios_get_app_version | ||
trigger_release_build(branch_to_build: "release/#{version}") | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Spatial locality ++
I'll take care of that in isolation. Hopefully this week. Thanks. |
Since Olivier is away this week, I'll "take over" and enable auto-merge for this PR after having approved it and applied a typo fix. |
Part of the paaHJt-1WQ-p2 project.
To test
bundle install
bundle exec fastlane new_hotfix_release version:17.6.1
(17.7.1
, there's already one pending for this one – pbArwn-2uE-p2)release/17.6.1
branch from the17.6
tagVersion.internal.xcconfig
,Version.public.xcconfig
andfastlane/Deliverfile
(*)release/17.6.1
branch. This is because we are gonna test the updated finalize lanes, and need to be on the hotfix release branch to test them. You might get conflicts, keep left (commits from this PR) every time.bundle exec fastlane finalize_release
(reply no when it suggests to update release toolkit). You should get an error telling you that you should usefinalize_hotfix_release
for hotfix branches instead.bundle exec fastlane finalize_hotfix_release
and verify that it triggered a release build, and that is is building it from the release/7.0.117.6.1 hotfix branch. Cancel the CI build immediately(NB:231
is a version code that already exists so in case you fail to cancel it, the build should fail to upload to playstore anyway)release/17.6.1
branch (from both local and remote)(*) @mokagio you might want to make sure that your changes about getting rid of
Deliverfile
in the repos won't be impacted by those version bumps btw. This test scenario, since it was exerced on the codebase from back in17.6
, still found aDeliverfile
back then, so that worked, but not sure about the impact of your changes there in other lanes. Especially, even thenew_beta_release
andnew_hotfix_release
might benefit from the similar change that you seem to have done on thecode_freeze
lane which addsskip_deliver: true
to the version bump action call. So you may want to replicate that change you did to all places, not just code freeze.