fastlane-plugin-wpmreleasetoolkit 11.1.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb +0 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +1 -9
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb +0 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/{create_release_action.rb → create_github_release_action.rb} +1 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb +0 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/publish_github_release_action.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +0 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb +57 -9
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +2 -373
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb +12 -30
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +26 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb +0 -270
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +1 -1
- metadata +8 -58
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +0 -137
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +0 -108
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +0 -90
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +0 -82
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +0 -91
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +0 -109
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +0 -108
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +0 -86
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +0 -89
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb +0 -62
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb +0 -62
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb +0 -62
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotfix_prechecks.rb +0 -78
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +0 -70
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +0 -98
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +0 -74
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +0 -67
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +0 -83
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +0 -87
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +0 -76
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +0 -65
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb +0 -40
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +0 -66
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb +0 -54
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_number.rb +0 -54
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb +0 -60
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb +0 -78
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +0 -44
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +0 -46
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb +0 -28
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b71377d7f0e796edf717a11ca452dd7c155106e8950500a183b59284649741cd
|
4
|
+
data.tar.gz: f948046099b8a967323e81aa409ccd806cbe6fc5d87a0a5624e0800055638511
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4431300d4963531af3f7c001a1f9b321ba1cdb8720721f9293046dccc07588b7a4bf5b00fa812623ddeb6e38e8a6f61fca84061f793fd9fc13ba46c6e4671d00
|
7
|
+
data.tar.gz: 39da07fb31ddad66c5a8140b1ef35e1150607d8761dae047e56bae804b90e618ece0f6a04bdff3c3e92ee2c3e5f68acf1072cf90602e67dc3ec71a9ffc3620fc
|
data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb
CHANGED
@@ -2,8 +2,6 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class AndroidCreateXmlReleaseNotesAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
require_relative '../../helper/android/android_git_helper'
|
6
|
-
|
7
5
|
release_notes_path = "#{params[:download_path]}/release_notes.xml"
|
8
6
|
open(release_notes_path, 'w') do |f|
|
9
7
|
params[:locales].each do |loc|
|
data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb
CHANGED
@@ -8,11 +8,9 @@ module Fastlane
|
|
8
8
|
def self.run(params)
|
9
9
|
require_relative '../../helper/android/android_version_helper'
|
10
10
|
|
11
|
-
build_gradle_path = params[:build_gradle_path]
|
12
11
|
version_properties_path = params[:version_properties_path]
|
13
12
|
|
14
13
|
version = Fastlane::Helper::Android::VersionHelper.get_release_version(
|
15
|
-
build_gradle_path: build_gradle_path,
|
16
14
|
version_properties_path: version_properties_path
|
17
15
|
)
|
18
16
|
Fastlane::Helper::Android::VersionHelper.is_hotfix?(version)
|
@@ -32,16 +30,10 @@ module Fastlane
|
|
32
30
|
|
33
31
|
def self.available_options
|
34
32
|
[
|
35
|
-
FastlaneCore::ConfigItem.new(key: :build_gradle_path,
|
36
|
-
description: 'Path to the build.gradle file',
|
37
|
-
type: String,
|
38
|
-
optional: true,
|
39
|
-
conflicting_options: [:version_properties_path]),
|
40
33
|
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
41
34
|
description: 'Path to the version.properties file',
|
42
35
|
type: String,
|
43
|
-
optional:
|
44
|
-
conflicting_options: [:build_gradle_path]),
|
36
|
+
optional: false),
|
45
37
|
]
|
46
38
|
end
|
47
39
|
|
@@ -1,8 +1,6 @@
|
|
1
1
|
require 'fastlane/action'
|
2
2
|
require 'date'
|
3
3
|
require_relative '../../helper/github_helper'
|
4
|
-
require_relative '../../helper/ios/ios_version_helper'
|
5
|
-
require_relative '../../helper/android/android_version_helper'
|
6
4
|
module Fastlane
|
7
5
|
module Actions
|
8
6
|
class CloseMilestoneAction < Action
|
@@ -1,11 +1,9 @@
|
|
1
1
|
require 'fastlane/action'
|
2
2
|
require 'date'
|
3
3
|
require_relative '../../helper/github_helper'
|
4
|
-
require_relative '../../helper/ios/ios_version_helper'
|
5
|
-
require_relative '../../helper/android/android_version_helper'
|
6
4
|
module Fastlane
|
7
5
|
module Actions
|
8
|
-
class
|
6
|
+
class CreateGithubReleaseAction < Action
|
9
7
|
def self.run(params)
|
10
8
|
repository = params[:repository]
|
11
9
|
version = params[:version]
|
@@ -2,7 +2,6 @@ require 'fastlane/action'
|
|
2
2
|
require 'date'
|
3
3
|
require_relative '../../helper/github_helper'
|
4
4
|
require_relative '../../helper/ios/ios_version_helper'
|
5
|
-
require_relative '../../helper/android/android_version_helper'
|
6
5
|
module Fastlane
|
7
6
|
module Actions
|
8
7
|
class CreateNewMilestoneAction < Action
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../../helper/github_helper'
|
3
|
+
|
4
|
+
module Fastlane
|
5
|
+
module Actions
|
6
|
+
class PublishGithubReleaseAction < Action
|
7
|
+
def self.run(params)
|
8
|
+
repository = params[:repository]
|
9
|
+
name = params[:name]
|
10
|
+
prerelease = params[:prerelease]
|
11
|
+
|
12
|
+
github_helper = Fastlane::Helper::GithubHelper.new(github_token: params[:github_token])
|
13
|
+
|
14
|
+
url = github_helper.publish_release(
|
15
|
+
repository: repository,
|
16
|
+
name: name,
|
17
|
+
prerelease: prerelease == :unchanged ? nil : prerelease
|
18
|
+
)
|
19
|
+
UI.success("Successfully published GitHub Release #{name}. You can see it at '#{url}'")
|
20
|
+
url
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.description
|
24
|
+
'Publish an existing GitHub Release still in draft mode'
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.authors
|
28
|
+
['Automattic']
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.return_value
|
32
|
+
'The URL of the published GitHub Release'
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.details
|
36
|
+
'Publish an existing GitHub Release still in draft mode'
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.available_options
|
40
|
+
[
|
41
|
+
FastlaneCore::ConfigItem.new(key: :repository,
|
42
|
+
description: 'The slug (`<org>/<repo>`) of the GitHub repository we want to create the release on',
|
43
|
+
optional: false,
|
44
|
+
type: String),
|
45
|
+
FastlaneCore::ConfigItem.new(key: :name,
|
46
|
+
description: 'The name (aka title) of the draft release to publish',
|
47
|
+
optional: false,
|
48
|
+
type: String),
|
49
|
+
FastlaneCore::ConfigItem.new(key: :prerelease,
|
50
|
+
description: 'True to publish as a pre-release. False to published as final. Don\'t provide a value to keep the same (non-)prerelease status as the one used in the Draft',
|
51
|
+
optional: true,
|
52
|
+
default_value: :unchanged,
|
53
|
+
type: Boolean),
|
54
|
+
Fastlane::Helper::GithubHelper.github_token_config_item,
|
55
|
+
]
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.is_supported?(platform)
|
59
|
+
true
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -7,9 +7,6 @@ module Fastlane
|
|
7
7
|
NON_STABLE_PODS_MESSAGE = "Please create a new stable version of those pods and update the Podfile to the newly released version before continuing with the code freeze:\n".freeze
|
8
8
|
|
9
9
|
def self.run(params)
|
10
|
-
require_relative '../../helper/ios/ios_version_helper'
|
11
|
-
require_relative '../../helper/ios/ios_git_helper'
|
12
|
-
|
13
10
|
yaml = YAML.load_file(params[:lockfile])
|
14
11
|
non_stable_pods = {} # Key will be pod name, value will be reason for flagging
|
15
12
|
|
data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb
CHANGED
@@ -2,15 +2,39 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class IosGenerateStringsFileFromCodeAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
output_encoding = begin
|
6
|
+
Encoding.find(params[:output_encoding])
|
7
|
+
rescue ArgumentError => e
|
8
|
+
UI.user_error!(e.message)
|
9
|
+
end
|
10
|
+
|
11
|
+
Dir.mktmpdir('genstrings-output-') do |tmpdir|
|
12
|
+
# Build the command arguments
|
13
|
+
files = files_matching(paths: params[:paths], exclude: params[:exclude])
|
14
|
+
flags = [
|
15
|
+
('-q' if params[:quiet]),
|
16
|
+
('-SwiftUI' if params[:swiftui]),
|
17
|
+
# If no endianness (-bigEndian vs -littleEndian) is specified, genstrings will use endianness of the current OS.
|
18
|
+
# Currently, genstrings runs only on macOS, which is little-endian, so this parameter is not strictly necessary.
|
19
|
+
# We make it explicit here to raise visibility on the relationship between the endianness of the genstring output and that of the encoding later on.
|
20
|
+
'-littleEndian',
|
21
|
+
].compact
|
22
|
+
flags += Array(params[:routines]).flat_map { |routine| ['-s', routine] }
|
23
|
+
cmd = ['genstrings', '-o', tmpdir, *flags, *files]
|
24
|
+
|
25
|
+
# Run the genstrings command
|
26
|
+
cmd_output = Actions.sh_control_output(*cmd, print_command: FastlaneCore::Globals.verbose?, print_command_output: true)
|
27
|
+
|
28
|
+
# Extract errors from output, if any
|
29
|
+
cmd_output = cmd_output.scrub.strip.split("\n")
|
30
|
+
errors = cmd_output.select { |line| line.include?('genstrings: error: ') }
|
31
|
+
UI.user_error!(errors.join("\n")) unless !params[:fail_on_error] || errors.empty?
|
32
|
+
|
33
|
+
# Convert generated files to requested encoding if necessary, and copy to final destination
|
34
|
+
post_process_generated_files(source_dir: tmpdir, dest_dir: params[:output_dir], dest_encoding: output_encoding)
|
35
|
+
|
36
|
+
cmd_output
|
37
|
+
end
|
14
38
|
end
|
15
39
|
|
16
40
|
# Adds the proper `**/*.{m,swift}` to the list of paths
|
@@ -24,6 +48,7 @@ module Fastlane
|
|
24
48
|
end
|
25
49
|
end
|
26
50
|
|
51
|
+
# List files matching a list of glob patterns, except the ones matching the list of exclusion patterns
|
27
52
|
def self.files_matching(paths:, exclude:)
|
28
53
|
globbed_paths = paths.map { |p| glob_pattern(p) }
|
29
54
|
Dir.glob(globbed_paths).reject do |file|
|
@@ -31,6 +56,24 @@ module Fastlane
|
|
31
56
|
end
|
32
57
|
end
|
33
58
|
|
59
|
+
# Convert the generated files in `source_dir` to the `dest_encoding` if necessary, then copy them to the final `dest_dir`
|
60
|
+
def self.post_process_generated_files(source_dir:, dest_dir:, dest_encoding:)
|
61
|
+
Dir.each_child(source_dir) do |filename|
|
62
|
+
source = File.join(source_dir, filename)
|
63
|
+
next if filename.start_with?('.') || !File.file?(source)
|
64
|
+
|
65
|
+
destination = File.join(dest_dir, filename)
|
66
|
+
if dest_encoding.name == 'UTF-16LE'
|
67
|
+
# genstrings generates UTF-16 LittleEndian by default, so if that's the requested output encoding, we just copy
|
68
|
+
# the file directly, to avoid the read/write dance, reduce memory footprint, and reduce risk of encoding errors on read
|
69
|
+
FileUtils.cp(source, destination)
|
70
|
+
else
|
71
|
+
content = File.read(source, binmode: true, encoding: 'BOM|UTF-16LE')
|
72
|
+
File.write(destination, content, binmode: true, encoding: dest_encoding.name)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
34
77
|
#####################################################
|
35
78
|
# @!group Documentation
|
36
79
|
#####################################################
|
@@ -85,6 +128,11 @@ module Fastlane
|
|
85
128
|
env_name: 'FL_IOS_GENERATE_STRINGS_FILE_FROM_CODE_OUTPUT_DIR',
|
86
129
|
description: 'The path to the directory where the generated `.strings` files should be created',
|
87
130
|
type: String),
|
131
|
+
FastlaneCore::ConfigItem.new(key: :output_encoding,
|
132
|
+
env_name: 'FL_IOS_GENERATE_STRINGS_FILE_FROM_CODE_OUTPUT_ENCODING',
|
133
|
+
description: 'The encoding to convert the generated files to',
|
134
|
+
type: String,
|
135
|
+
default_value: 'UTF-16LE'), # The default encoding used by `genstrings` for generated files
|
88
136
|
FastlaneCore::ConfigItem.new(key: :fail_on_error,
|
89
137
|
env_name: 'FL_IOS_GENERATE_STRINGS_FILE_FROM_CODE_FAIL_ON_ERROR',
|
90
138
|
description: 'If true, will fail with user_error! if `genstrings` printed any error while parsing',
|