Skip to content

Commit 2f8b1fc

Browse files
Merge branch 'update/octokit' into update/buildkite-test-collector
2 parents be16aee + 0f1bd87 commit 2f8b1fc

File tree

9 files changed

+19
-11
lines changed

9 files changed

+19
-11
lines changed

.rubocop.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ Style/AsciiComments:
4949
Style/StringConcatenation:
5050
Enabled: false
5151

52+
# This rule was enforced after upgrading Rubocop from `1.22.1` to `1.50.2`. We are disabling this rule for the
53+
# time being so that we don't see any unexpected behavior when running Release Toolkit actions that could be
54+
# changed by this rule. See https://github.com/wordpress-mobile/release-toolkit/pull/464#pullrequestreview-1396569629
55+
# for more discussion
56+
Style/FetchEnvVar:
57+
Enabled: false
58+
5259
########## Gemspec Rules
5360

5461
# This was turned on by default after updating Rubocop to `1.50.2`. We want to disable this for now because

CHANGELOG.md

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

77
### Breaking Changes
88

9-
- Update `octokit` to `5.6.1` This is a major version bump from version `4.18`. The [breaking change in version `5.0.0`](https://github.com/octokit/octokit.rb/releases/tag/v5.0.0) is dropping Ruby 2.6 and lower. [#464]
9+
_None_
1010

1111
### New Features
1212

@@ -21,6 +21,7 @@ _None_
2121
- Add "Mobile Secrets" to `configure_update` current branch message to clarify which repo it's referring to. [#455]
2222
- `buildkite_trigger_build` now prints the web URL of the newly scheduled build, to allow you to easily open it via cmd-click. [#460]
2323
- Add the branch information to the 'This is not a release branch' error that's thrown from complete code freeze lane. [#461]
24+
- Update `octokit` to `5.6.1` This is a major version bump from version `4.18`, but is not a breaking change for the Release Toolkit because it doesn't change any public APIs for clients. [#464]
2425
- Update `danger` to `9.3.0`. This is an internal-only change and is not a breaking change for clients. [#464]
2526
- 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]
2627

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def self.available_options
4848
env_name: 'FL_DOWNLOAD_TRANSLATIONS_RES_DIR',
4949
description: "The path to the Android project's `res` dir (typically the `<project name>/src/main/res` directory) containing the `values-*` subdirs",
5050
type: String,
51-
default_value: "#{ENV.fetch('PROJECT_NAME', nil)}/src/main/res"
51+
default_value: "#{ENV['PROJECT_NAME']}/src/main/res"
5252
),
5353
FastlaneCore::ConfigItem.new(
5454
key: :glotpress_url,

lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ def self.commit_version_bump
1616
if File.exist?(Fastlane::Helper::Android::VersionHelper.version_properties_file)
1717
Fastlane::Helper::GitHelper.commit(
1818
message: 'Bump version number',
19-
files: File.join(ENV.fetch('PROJECT_ROOT_FOLDER', nil), 'version.properties'),
19+
files: File.join(ENV['PROJECT_ROOT_FOLDER'], 'version.properties'),
2020
push: true
2121
)
2222
else
2323
Fastlane::Helper::GitHelper.commit(
2424
message: 'Bump version number',
25-
files: File.join(ENV.fetch('PROJECT_ROOT_FOLDER', nil), ENV.fetch('PROJECT_NAME', nil), 'build.gradle'),
25+
files: File.join(ENV['PROJECT_ROOT_FOLDER'], ENV['PROJECT_NAME'], 'build.gradle'),
2626
push: true
2727
)
2828
end

lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_tools_path_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class ToolsPathHelper
1010
attr_reader :android_home
1111

1212
def initialize(sdk_root: nil)
13-
@android_home = sdk_root || ENV.fetch('ANDROID_HOME', nil) || ENV.fetch('ANDROID_SDK_ROOT', nil) || ENV.fetch('ANDROID_SDK', nil)
13+
@android_home = sdk_root || ENV['ANDROID_HOME'] || ENV['ANDROID_SDK_ROOT'] || ENV['ANDROID_SDK']
1414
end
1515

1616
# @param [String] binary The name of the binary to search for

lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def self.get_keyword_from_gradle_file(file_path, section, keyword)
467467
def self.gradle_path
468468
UI.user_error!("You need to set the `PROJECT_ROOT_FOLDER` environment variable to the path to the project's root") if ENV['PROJECT_ROOT_FOLDER'].nil?
469469
UI.user_error!('You need to set the `PROJECT_NAME` environment variable to the relative path to the project subfolder name') if ENV['PROJECT_NAME'].nil?
470-
File.join(ENV.fetch('PROJECT_ROOT_FOLDER', nil), ENV.fetch('PROJECT_NAME', nil), 'build.gradle')
470+
File.join(ENV['PROJECT_ROOT_FOLDER'], ENV['PROJECT_NAME'], 'build.gradle')
471471
end
472472

473473
# Update both the versionName and versionCode of the build.gradle file to the specified version.

lib/fastlane/plugin/wpmreleasetoolkit/helper/interactive_prompt_reminder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def self.monkey_patch_interactive_prompts_with_reminder(after: DEFAULT_PROMPT_RE
8484

8585
# Apply Monkey patch
8686
unless ENV['FASTLANE_PROMPT_REMINDER_DISABLE_AUTO_PATCH']
87-
message = ENV.fetch('FASTLANE_PROMPT_REMINDER_MESSAGE', nil)
87+
message = ENV['FASTLANE_PROMPT_REMINDER_MESSAGE']
8888
message = FastlaneCore::Shell::DEFAULT_PROMPT_REMINDER_MESSAGE if %w[default true yes 1].include?(message&.downcase)
8989
delays = ENV['FASTLANE_PROMPT_REMINDER_DELAYS']&.split(',')&.map(&:to_i) || FastlaneCore::Shell::DEFAULT_PROMPT_REMINDER_DELAYS
9090

lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ module GitHelper
1818
# @param [Bool] include_metadata If true (the default), includes the `fastlane/download_metadata.swift` file and the `.pot` file (which typically contains an entry or release notes for the new version)
1919
#
2020
def self.commit_version_bump(include_deliverfile: true, include_metadata: true)
21-
files_list = [File.join(ENV.fetch('PROJECT_ROOT_FOLDER', nil), 'config', '.')]
21+
files_list = [File.join(ENV['PROJECT_ROOT_FOLDER'], 'config', '.')]
2222
files_list.append File.join('fastlane', 'Deliverfile') if include_deliverfile
2323
if include_metadata
2424
files_list.append File.join('fastlane', 'download_metadata.swift')
25-
files_list.append File.join(ENV.fetch('PROJECT_ROOT_FOLDER', nil), ENV.fetch('PROJECT_NAME', nil), 'Resources', ENV.fetch('APP_STORE_STRINGS_FILE_NAME', nil))
25+
files_list.append File.join(ENV['PROJECT_ROOT_FOLDER'], ENV['PROJECT_NAME'], 'Resources', ENV['APP_STORE_STRINGS_FILE_NAME'])
2626
end
2727

2828
Fastlane::Helper::GitHelper.commit(message: 'Bump version number', files: files_list, push: true)

lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def self.update_fastlane_deliver(new_version)
219219
# @param [String] internal_version The new version number to use as `VERSION_LONG` for the interrnal xcconfig file, if it exists
220220
#
221221
def self.update_xc_configs(new_version, new_version_short, internal_version)
222-
update_xc_config(ENV.fetch('PUBLIC_CONFIG_FILE', nil), new_version, new_version_short)
222+
update_xc_config(ENV['PUBLIC_CONFIG_FILE'], new_version, new_version_short)
223223
update_xc_config(ENV['INTERNAL_CONFIG_FILE'], internal_version, new_version_short) unless ENV['INTERNAL_CONFIG_FILE'].nil?
224224
end
225225

@@ -311,7 +311,7 @@ def self.read_from_config_file(key, filePath)
311311
# The second element is the version extracted from the internal config file, only present if one was provided.
312312
def self.get_version_strings
313313
version_strings = []
314-
version_strings << read_long_version_from_config_file(ENV.fetch('PUBLIC_CONFIG_FILE', nil))
314+
version_strings << read_long_version_from_config_file(ENV['PUBLIC_CONFIG_FILE'])
315315
version_strings << read_long_version_from_config_file(ENV['INTERNAL_CONFIG_FILE']) unless ENV['INTERNAL_CONFIG_FILE'].nil?
316316

317317
return version_strings

0 commit comments

Comments
 (0)