Skip to content

Commit c98a776

Browse files
Merge branch 'trunk' into fix/rubocop-violations
2 parents 8656f76 + d6b1f42 commit c98a776

File tree

54 files changed

+259
-150
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+259
-150
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
- [ ] Run `bundle exec rubocop` to test for code style violations and recommendations
66
- [ ] Add Unit Tests (aka `specs/*_spec.rb`) if applicable
77
- [ ] Run `bundle exec rspec` to run the whole test suite and ensure all your tests pass
8-
- [ ] Make sure you added an entry in [the `CHANGELOG.md` file](https://github.com/wordpress-mobile/release-toolkit/blob/trunk/CHANGELOG.md#trunk) to describe your changes under the approprioate existing `###` subsection of the existing `## Trunk` section.
8+
- [ ] Make sure you added an entry in [the `CHANGELOG.md` file](https://github.com/wordpress-mobile/release-toolkit/blob/trunk/CHANGELOG.md#trunk) to describe your changes under the appropriate existing `###` subsection of the existing `## Trunk` section.
9+
- [ ] If applicable, add an entry in [the `MIGRATION.md` file](https://github.com/wordpress-mobile/release-toolkit/blob/trunk/MIGRATION.md) to describe how the changes will affect the migration from the previous major version and what the clients will need to change and consider.

CHANGELOG.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,53 @@ _None_
1010

1111
### New Features
1212

13-
- Add `ios_get_build_number` action to get the current build number from an `xcconfig` file. [#458]
14-
13+
_None_
1514

1615
### Bug Fixes
1716

1817
_None_
1918

19+
### Internal Changes
20+
21+
- Updates `octokit` to `6.1.1`, `danger` to `9.3.1` and `buildkite-test_collector` to `2.3.1`. [#491]
22+
23+
## 8.1.0
24+
25+
### New Features
26+
27+
- Adds auto_retry option to `gp_downloadmetadata_action`. [#474]
28+
29+
## 8.0.1
30+
31+
### Bug Fixes
32+
33+
- Revert the `gp_downloadmetadata_action` `locales` item type from `type: Hash` to `is_string: false`. [#478]
34+
35+
## 8.0.0
36+
37+
### Breaking Changes
38+
39+
- Remove git push commands after creating a new commit or branch. [#472] See `MIGRATION.md` for instructions.
40+
41+
## 7.1.2
42+
43+
### Bug Fixes
44+
45+
- Revert the `gp_downloadmetadata_action` `locales` item type from `type: Hash` to `is_string: false`. [#480]
46+
47+
## 7.1.1
48+
49+
### Internal Changes
50+
51+
- Remove `rubygems_mfa_required` from the `gemspec`. [#475]
52+
53+
## 7.1.0
54+
55+
### New Features
56+
57+
- Add `ios_get_build_number` action to get the current build number from an `xcconfig` file. [#458]
58+
59+
2060
### Internal Changes
2161

2262
- Add "Mobile Secrets" to `configure_update` current branch message to clarify which repo it's referring to. [#455]
@@ -26,6 +66,9 @@ _None_
2666
- Update `danger` to `9.3.0`. This is an internal-only change and is not a breaking change for clients. [#464]
2767
- Replace `rspec-buildkite-analytics` with `buildkite-test_collector` (Buildkite renamed the gem) and update it to `2.2.0`. This is another internal-only change and is not a breaking change for clients. [#465]
2868
- Adds `ignore_pipeline_branch_filters=true` parameter to the API call triggering a Buildkite build [#468]
69+
- Replace all instances of `is_string` with `type` [#469]
70+
- Use `git_branch_name_using_HEAD` instead of `git_branch` so that the return value is not modified by environment variables. This has no impact to our current release flow, that's why it's not in "Breaking changes" section. [#463]
71+
- Deprecate `ios_clear_intermediate_tags` & `ios_final_tag` actions. [#471]
2972

3073
## 7.0.0
3174

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ gem 'codecov', require: false
99
gem 'webmock', require: false
1010
gem 'yard'
1111

12-
gem 'buildkite-test_collector', '~> 2.2'
12+
gem 'buildkite-test_collector', '~> 2.3'

Gemfile.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
fastlane-plugin-wpmreleasetoolkit (7.0.0)
4+
fastlane-plugin-wpmreleasetoolkit (8.1.0)
55
activesupport (>= 6.1.7.1)
66
bigdecimal (~> 1.4)
77
buildkit (~> 1.5)
@@ -10,7 +10,7 @@ PATH
1010
git (~> 1.3)
1111
google-cloud-storage (~> 1.31)
1212
nokogiri (~> 1.11)
13-
octokit (~> 5.6)
13+
octokit (~> 6.1)
1414
parallel (~> 1.14)
1515
plist (~> 3.1)
1616
progress_bar (~> 1.3)
@@ -55,7 +55,7 @@ GEM
5555
bigdecimal (1.4.4)
5656
buildkit (1.5.0)
5757
sawyer (>= 0.6)
58-
buildkite-test_collector (2.2.0)
58+
buildkite-test_collector (2.3.1)
5959
activesupport (>= 4.2)
6060
chroma (0.2.0)
6161
claide (1.1.0)
@@ -112,18 +112,18 @@ GEM
112112
colored2 (~> 3.1)
113113
crack (0.4.5)
114114
rexml
115-
danger (9.3.0)
115+
danger (9.3.1)
116116
claide (~> 1.0)
117117
claide-plugins (>= 0.9.2)
118118
colored2 (~> 3.1)
119119
cork (~> 0.1)
120120
faraday (>= 0.9.0, < 3.0)
121121
faraday-http-cache (~> 2.0)
122-
git (~> 1.13.0)
122+
git (~> 1.13)
123123
kramdown (~> 2.3)
124124
kramdown-parser-gfm (~> 1.0)
125125
no_proxy_fix
126-
octokit (~> 5.0)
126+
octokit (~> 6.0)
127127
terminal-table (>= 1, < 4)
128128
danger-rubocop (0.10.0)
129129
danger
@@ -160,7 +160,7 @@ GEM
160160
faraday-em_http (1.0.0)
161161
faraday-em_synchrony (1.0.0)
162162
faraday-excon (1.1.0)
163-
faraday-http-cache (2.4.1)
163+
faraday-http-cache (2.5.0)
164164
faraday (>= 0.8)
165165
faraday-httpclient (1.0.1)
166166
faraday-multipart (1.0.4)
@@ -288,7 +288,7 @@ GEM
288288
nokogiri (1.14.3)
289289
mini_portile2 (~> 2.8.0)
290290
racc (~> 1.4)
291-
octokit (5.6.1)
291+
octokit (6.1.1)
292292
faraday (>= 1, < 3)
293293
sawyer (~> 0.9)
294294
open4 (1.3.4)
@@ -413,7 +413,7 @@ PLATFORMS
413413
ruby
414414

415415
DEPENDENCIES
416-
buildkite-test_collector (~> 2.1)
416+
buildkite-test_collector (~> 2.3)
417417
bundler (~> 2.0)
418418
cocoapods (~> 1.10)
419419
codecov

MIGRATION.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Migration Instructions for Major Releases
2+
3+
### From `7.0.0` to `8.0.0`
4+
5+
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.
6+
7+
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.

fastlane-plugin-wpmreleasetoolkit.gemspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
3030
spec.add_dependency 'diffy', '~> 3.3'
3131
spec.add_dependency 'git', '~> 1.3'
3232
spec.add_dependency 'nokogiri', '~> 1.11' # Needed for AndroidLocalizeHelper
33-
spec.add_dependency 'octokit', '~> 5.6'
33+
spec.add_dependency 'octokit', '~> 6.1'
3434
spec.add_dependency 'parallel', '~> 1.14'
3535
spec.add_dependency 'plist', '~> 3.1'
3636
spec.add_dependency 'progress_bar', '~> 1.3'
@@ -60,5 +60,4 @@ Gem::Specification.new do |spec|
6060
spec.add_development_dependency 'rubocop-require_tools', '~> 0.1.2'
6161
spec.add_development_dependency 'rubocop-rspec', '2.3.0'
6262
spec.add_development_dependency 'simplecov', '~> 0.16.1'
63-
spec.metadata['rubygems_mfa_required'] = 'true'
6463
end

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def self.available_options
131131
FastlaneCore::ConfigItem.new(key: :po_file_path,
132132
env_name: 'FL_UPDATE_METADATA_SOURCE_PO_FILE_PATH',
133133
description: 'The path of the .po file to update',
134-
is_string: true,
134+
type: String,
135135
verify_block: proc do |value|
136136
UI.user_error!("No .po file path for UpdateMetadataSourceAction given, pass using `po_file_path: 'file path'`") unless value && (!value.empty?)
137137
UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
@@ -145,7 +145,7 @@ def self.available_options
145145
FastlaneCore::ConfigItem.new(key: :source_files,
146146
env_name: 'FL_UPDATE_METADATA_SOURCE_SOURCE_FILES',
147147
description: 'The hash with the path to the source files and the key to use to include their content',
148-
is_string: false,
148+
type: Hash,
149149
verify_block: proc do |value|
150150
UI.user_error!("No source file hash for UpdateMetadataSourceAction given, pass using `source_files: 'source file hash'`") unless value && (!value.empty?)
151151
end),

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,37 @@ def self.return_value
3333
end
3434

3535
def self.details
36-
'Checks that the strings to be localised are updated from the libs into the main application file'
36+
<<~DETAILS
37+
Checks that the strings to be localised are updated from the libs into the main application file
38+
39+
For the `lib_strings_path` ConfigItem, it is an array of Hashes, each describing a library and
40+
containing these specific keys:
41+
- `:library`: The human readable name of the library, used to display in console messages
42+
- `:strings_path`: The path to the strings.xml file of the library to merge into the main one
43+
- `:exclusions`: An array of strings keys to exclude during merge. Any of those keys from the
44+
library's `strings.xml` will be skipped and won't be merged into the main one.
45+
- `:source_id`: An optional `String` which will be added as the `a8c-src-lib` XML attribute
46+
to strings coming from this library, to help identify their source in the merged file.
47+
- `:add_ignore_attr`: If set to `true`, will add `tools:ignore="UnusedResources"` to merged strings.
48+
DETAILS
3749
end
3850

3951
def self.available_options
4052
[
4153
FastlaneCore::ConfigItem.new(key: :app_strings_path,
4254
description: 'The path of the main strings file',
4355
optional: false,
44-
is_string: true),
56+
type: String),
4557
FastlaneCore::ConfigItem.new(key: :libs_strings_path,
4658
env_name: 'CHECK_LIBS_STRINGS_PATH',
47-
description: 'The list of libs to merge',
59+
description: 'The list of libs to merge. This should be an array of Hashes.',
4860
optional: false,
49-
is_string: false),
61+
type: Array),
5062
FastlaneCore::ConfigItem.new(key: :diff_url,
5163
env_name: 'CHECK_LIBS_DIFF_URL',
5264
description: 'The url of the diff to check',
5365
optional: true,
54-
is_string: true),
66+
type: String),
5567
]
5668
end
5769

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ def self.available_options
7474
FastlaneCore::ConfigItem.new(key: :base_version,
7575
env_name: 'FL_ANDROID_BETABUILD_PRECHECKS_BASE_VERSION',
7676
description: 'The version to work on', # a short description of this parameter
77-
is_string: true,
77+
type: String,
7878
optional: true), # true: verifies the input is a string, false: every kind of value),
7979
FastlaneCore::ConfigItem.new(key: :skip_confirm,
8080
env_name: 'FL_ANDROID_BETABUILD_PRECHECKS_SKIPCONFIRM',
8181
description: 'Skips confirmation',
82-
is_string: false, # true: verifies the input is a string, false: every kind of value
82+
type: Boolean,
8383
default_value: false), # the default value if the user didn't provide one
8484
FastlaneCore::ConfigItem.new(key: :default_branch,
8585
env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,22 @@ def self.available_options
4646
FastlaneCore::ConfigItem.new(key: :skip_confirm,
4747
env_name: 'FL_ANDROID_BUILD_PRECHECKS_SKIP_CONFIRM',
4848
description: 'True to avoid the system ask for confirmation',
49-
is_string: false,
49+
type: Boolean,
5050
default_value: false),
5151
FastlaneCore::ConfigItem.new(key: :alpha,
5252
env_name: 'FL_ANDROID_BUILD_PRECHECKS_ALPHA_BUILD',
5353
description: 'True if this is for an alpha build',
54-
is_string: false,
54+
type: Boolean,
5555
default_value: false),
5656
FastlaneCore::ConfigItem.new(key: :beta,
5757
env_name: 'FL_ANDROID_BUILD_PRECHECKS_BETA_BUILD',
5858
description: 'True if this is for a beta build',
59-
is_string: false,
59+
type: Boolean,
6060
default_value: false),
6161
FastlaneCore::ConfigItem.new(key: :final,
6262
env_name: 'FL_ANDROID_BUILD_PRECHECKS_FINAL_BUILD',
6363
description: 'True if this is for a final build',
64-
is_string: false,
64+
type: Boolean,
6565
default_value: false),
6666
]
6767
end

0 commit comments

Comments
 (0)