Skip to content

Commit 462ea76

Browse files
authored
Merge pull request #489 from wordpress-mobile/iangmaia/trial
Various clean-ups and configuration improvements
2 parents 0f6c702 + 01f73eb commit 462ea76

15 files changed

+168
-243
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
### Breaking Changes
88

9-
_None_
9+
- Add the `public_version_xcconfig_file` parameter to the `ios_get_app_version` action to replace the need for an environment variable [#445]
10+
- Remove the `ios_localize_project` and `ios_update_metadata` actions [#447]
11+
- Remove the `skip_deliver` parameter from `ios_bump_version_hotfix` and `ios_bump_version_release` actions [#450]
1012

1113
### New Features
1214

@@ -85,6 +87,7 @@ _None_
8587
### Internal Changes
8688

8789
- Updates `activesupport` to `6.1.7.1`, addressing [a security issue](https://github.com/advisories/GHSA-j6gc-792m-qgm2). This is a major version change, but as the dependency is internal-only, it shouldn't be a breaking change for clients. [#441]
90+
- Add the explicit dependency to `xcodeproj (~> 1.22)`, used in this case to replace the previous manual parsing of `.xcconfig` files. [#451]
8891

8992
## 6.3.0
9093

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ PATH
1616
progress_bar (~> 1.3)
1717
rake (>= 12.3, < 14.0)
1818
rake-compiler (~> 1.0)
19+
xcodeproj (~> 1.22)
1920

2021
GEM
2122
remote: https://rubygems.org/

MIGRATION.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
# Migration Instructions for Major Releases
22

3-
### From `7.0.0` to `8.0.0`
3+
## From `8.0.0` to `9.0.0`
4+
5+
- The deprecated actions `ios_localize_project` and `ios_update_metadata` were now completely removed. If your project is still using them, please use the new tooling instead.
6+
- See `ios_generate_strings_file_from_code`, `ios_extract_keys_from_strings_files`, `ios_download_strings_files_from_glotpress` and `ios_merge_strings_files` for typical replacements.
7+
- The action `ios_get_app_version` now requires a parameter `public_version_xcconfig_file` with the public `.xcconfig` file path instead of relying on the environment variable `PUBLIC_CONFIG_FILE`. While the complete removal of this environment variable is our goal, at this point it is still required by other actions such as `ios_bump_version_release` and `ios_codefreeze_prechecks`.
8+
- The usage of a `Deliverfile` (including its `app_version`) is discouraged -- please use `upload_to_app_store` directly from your `Fastfile` instead. Therefore, the parameter `skip_deliver` from the actions `ios_bump_version_hotfix` and `ios_bump_version_release` has been removed.
9+
10+
### Clean-ups
11+
12+
- You can now delete the `ENV['APP_STORE_STRINGS_FILE_NAME']` from your Fastfile, as it isn't being used anymore.
13+
14+
## From `7.0.0` to `8.0.0`
415

516
We are no longer pushing to remote after creating a new commit or a branch. That means, developers need to manually push the changes or add push commands in the project's `Fastfile`. Most importantly, we can no longer immediately trigger beta/final builds after creating a new commit because the changes will not be in remote yet. If you want to keep the existing behavior, you'll need to add a push command before these triggers.
617

718
For example, in [WordPress-Android's `new_beta_release` lane](https://github.com/wordpress-mobile/WordPress-Android/blob/0c64cb84c256e004473e97d72b4ac6682ebc140b/fastlane/lanes/release.rb#L86), we download translations, bump the beta version and then trigger a new build in CI. After migrating to `8.0.0` of `release-toolkit`, we'll need to add [`push_to_git_remote`](https://docs.fastlane.tools/actions/push_to_git_remote/) command before this trigger to keep the existing behavior.
19+
20+
## From `6.0.0` to `7.0.0`
21+
22+
Ensure that calls to `ios_bump_version_release` already passed `skip_glotpress: true`.
23+
In case of passing false as parameter or not providing a value (false being the default for this ConfigItem), you'll have to ensure that:
24+
- `download_metadata.swift` isn't being used; if it is, it's a good time to migrate to the new tooling
25+
- You're not relying on `ios_bump_version_release` for commiting the `.po/.pot` file

fastlane-plugin-wpmreleasetoolkit.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
3636
spec.add_dependency 'progress_bar', '~> 1.3'
3737
spec.add_dependency 'rake', '>= 12.3', '< 14.0'
3838
spec.add_dependency 'rake-compiler', '~> 1.0'
39+
spec.add_dependency 'xcodeproj', '~> 1.22'
3940

4041
# `google-cloud-storage` is required by fastlane, but we pin it in case it's not in the future
4142
spec.add_dependency 'google-cloud-storage', '~> 1.31'

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def self.run(params)
1515
Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_beta_version, @short_version, @new_internal_version)
1616
UI.message 'Done!'
1717

18-
Fastlane::Helper::Ios::GitHelper.commit_version_bump(include_deliverfile: false, include_metadata: false)
18+
Fastlane::Helper::Ios::GitHelper.commit_version_bump
1919
end
2020

2121
#####################################################

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,11 @@ def self.run(params)
99
create_config(params[:previous_version], params[:version])
1010
show_config
1111

12-
update_deliverfile = params[:skip_deliver] == false
13-
if update_deliverfile
14-
UI.message 'Updating Fastlane deliver file...'
15-
Fastlane::Helper::Ios::VersionHelper.update_fastlane_deliver(@new_short_version)
16-
UI.message 'Done!'
17-
end
18-
1912
UI.message 'Updating XcConfig...'
2013
Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_version, @new_short_version, @new_version_internal)
2114
UI.message 'Done!'
2215

23-
Fastlane::Helper::Ios::GitHelper.commit_version_bump(include_deliverfile: update_deliverfile, include_metadata: false)
16+
Fastlane::Helper::Ios::GitHelper.commit_version_bump
2417

2518
UI.message 'Done.'
2619
end
@@ -51,16 +44,6 @@ def self.available_options
5144
description: 'The version to branch from',
5245
type: String
5346
),
54-
FastlaneCore::ConfigItem.new(
55-
key: :skip_deliver,
56-
env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_SKIP_DELIVER',
57-
description: 'Skips Deliverfile key update',
58-
type: Boolean,
59-
optional: true,
60-
# Don't skip the Deliverfile by default. At the time of writing, 2 out of 3 consumers
61-
# still have a Deliverfile.
62-
default_value: false
63-
),
6447
]
6548
end
6649

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,11 @@ def self.run(params)
2121
Fastlane::Helper::GitHelper.create_branch(@new_release_branch, from: default_branch)
2222
UI.message 'Done!'
2323

24-
UI.message 'Updating Fastlane deliver file...' unless params[:skip_deliver]
25-
Fastlane::Helper::Ios::VersionHelper.update_fastlane_deliver(@new_short_version) unless params[:skip_deliver]
26-
UI.message 'Done!' unless params[:skip_deliver]
27-
2824
UI.message 'Updating XcConfig...'
2925
Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_version, @new_short_version, @new_version_internal)
3026
UI.message 'Done!'
3127

32-
Fastlane::Helper::Ios::GitHelper.commit_version_bump(
33-
include_deliverfile: !params[:skip_deliver],
34-
include_metadata: false
35-
)
28+
Fastlane::Helper::Ios::GitHelper.commit_version_bump
3629

3730
UI.message 'Done.'
3831
end
@@ -51,11 +44,6 @@ def self.details
5144

5245
def self.available_options
5346
[
54-
FastlaneCore::ConfigItem.new(key: :skip_deliver,
55-
env_name: 'FL_IOS_CODEFREEZE_BUMP_SKIPDELIVER',
56-
description: 'Skips Deliver key update',
57-
type: Boolean,
58-
default_value: false),
5947
FastlaneCore::ConfigItem.new(key: :default_branch,
6048
env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',
6149
description: 'Default branch of the repository',

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ class IosGetAppVersionAction < Action
44
def self.run(params)
55
require_relative '../../helper/ios/ios_version_helper'
66

7-
UI.user_error!('You need to set at least the PUBLIC_CONFIG_FILE env var to the path to the public xcconfig file') unless ENV['PUBLIC_CONFIG_FILE']
8-
9-
Fastlane::Helper::Ios::VersionHelper.get_public_version
7+
public_version_xcconfig_file = params[:public_version_xcconfig_file]
8+
Fastlane::Helper::Ios::VersionHelper.get_xcconfig_public_version(xcconfig_file: public_version_xcconfig_file)
109
end
1110

1211
#####################################################
@@ -22,7 +21,15 @@ def self.details
2221
end
2322

2423
def self.available_options
25-
# Define all options your action supports.
24+
[
25+
FastlaneCore::ConfigItem.new(
26+
key: :public_version_xcconfig_file,
27+
env_name: 'FL_IOS_PUBLIC_VERSION_XCCONFIG_FILE',
28+
description: 'Path to the .xcconfig file containing the public app version',
29+
type: String,
30+
optional: false
31+
),
32+
]
2633
end
2734

2835
def self.output

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_localize_project.rb

Lines changed: 0 additions & 43 deletions
This file was deleted.

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata.rb

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)