Skip to content

Commit

Permalink
Download store metadata when generating beta build (#21623)
Browse files Browse the repository at this point in the history
* Download store metadata when generating beta build

This should provide earlier feedback on the metadata translation, at
least for the portion that has already been translated at the time a
beta is made.

This is consistent with what we do in iOS, see
https://github.com/wordpress-mobile/WordPress-iOS/blob/b9a0deaf091739f33051f20cffdbe9a2097f645e/fastlane/lanes/release.rb#L219

* Remove call to push changes in download translated metadata lane

Automatically pushing from lanes other than the root-release lanes (code
freeze, new beta, finalize release, etc.) can result in undesired
pushes, like it just happened to me in
edcd40a
  • Loading branch information
mokagio authored Jan 28, 2025
1 parent 1569039 commit fc089de
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions fastlane/lanes/localization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,10 @@
# Defaults to current `versionName`. Only required if skip_release_notes is false
# @param [Boolean] skip_release_notes Whether to skip downloading release notes. Default false
# @param [Boolean] skip_commit If true, will skip the `git add`, `git commit` and `git push` operations. Default to false.
# @param [Boolean] skip_git_push If true, will skip the `git push` at the end. Default to false. Inferred to `true` if `skip_commit` is `true`.
#
# @return [void]
#
lane :download_metadata_strings do |app: nil, version: current_release_version, skip_release_notes: false, skip_commit: false, skip_git_push: false|
lane :download_metadata_strings do |app: nil, version: current_release_version, skip_release_notes: false, skip_commit: false|
version = nil if skip_release_notes

# If no `app:` is specified, call this for both WordPress and Jetpack
Expand Down Expand Up @@ -246,7 +245,6 @@
message += " for #{version}" unless version.nil?
git_commit(path: metadata_download_path, message: message, allow_nothing_to_commit: true)
end
push_to_git_remote unless skip_commit || skip_git_push
end

########################################################################
Expand Down
1 change: 1 addition & 0 deletions fastlane/lanes/release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@

update_frozen_strings_for_translation
download_translations
download_metadata_strings(version: current_release_version)

# Bump the release version and build code
UI.message 'Bumping beta version and build code...'
Expand Down
2 changes: 1 addition & 1 deletion fastlane/lanes/screenshots.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
end
app = get_app_name_option!(options)

download_metadata_strings(app: app, skip_release_notes: true, skip_git_push: true) unless options.fetch(:skip_download_strings, false)
download_metadata_strings(app: app, skip_release_notes: true) unless options.fetch(:skip_download_strings, false)

# Define intermediate folders
raw_screenshots_dir = screenshots_dir(app: app, subfolder: 'raw')
Expand Down

0 comments on commit fc089de

Please sign in to comment.