fastlane-plugin-wpmreleasetoolkit 6.2.0 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_annotate_action.rb +85 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_metadata_action.rb +67 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb +259 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +4 -22
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_clear_intermediate_tags.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_final_tag.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +1 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +1 -1
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac3e9b8a4272392eae5f25dea94507640a13efabfe293e465b38dea1caf71f87
|
4
|
+
data.tar.gz: 922fe5a513a91f55a1a54e3ba256765b709f61237316c4710ff9af209053cb3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9244c54b46964f9d1f0a11313cedde4e8ee4c5c910ec074caef5f56a12f9e472e46e3ac4bb3fc8fc047cf1abf67899a3f0f2fb9f488f54c3b697199bdf71130f
|
7
|
+
data.tar.gz: b8322d1a08bc6f3d94e128664c428243445e37c99503d2d807ec5902170ae5dfcd00d7eaeb08fa73ef283fb85aa07f2242048ebdf9383bc340817bd06292f99a
|
@@ -0,0 +1,85 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class BuildkiteAnnotateAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
message = params[:message]
|
6
|
+
context = params[:context]
|
7
|
+
style = params[:style]
|
8
|
+
|
9
|
+
if message.nil?
|
10
|
+
# Delete an annotation, but swallow the error if the annotation didn't exist — to avoid having
|
11
|
+
# this action failing or printing a red log for no good reason — hence the `|| true`
|
12
|
+
ctx_param = "--context #{context.shellescape}" unless context.nil?
|
13
|
+
sh("buildkite-agent annotation remove #{ctx_param} || true")
|
14
|
+
else
|
15
|
+
# Add new annotation using `buildkite-agent`
|
16
|
+
extra_params = {
|
17
|
+
context: context,
|
18
|
+
style: style
|
19
|
+
}.compact.flat_map { |k, v| ["--#{k}", v] }
|
20
|
+
sh('buildkite-agent', 'annotate', *extra_params, params[:message])
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
#####################################################
|
25
|
+
# @!group Documentation
|
26
|
+
#####################################################
|
27
|
+
|
28
|
+
def self.description
|
29
|
+
'Add or remove annotations to the current Buildkite build'
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.details
|
33
|
+
<<~DETAILS
|
34
|
+
Add or remove annotations to the current Buildkite build.
|
35
|
+
|
36
|
+
Has to be run on a CI job (where a `buildkite-agent` is running), e.g. typically by a lane
|
37
|
+
that is triggered as part of a Buildkite CI step.
|
38
|
+
|
39
|
+
See https://buildkite.com/docs/agent/v3/cli-annotate
|
40
|
+
DETAILS
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.available_options
|
44
|
+
[
|
45
|
+
FastlaneCore::ConfigItem.new(
|
46
|
+
key: :context,
|
47
|
+
env_name: 'BUILDKITE_ANNOTATION_CONTEXT',
|
48
|
+
description: 'The context of the annotation used to differentiate this annotation from others',
|
49
|
+
type: String,
|
50
|
+
optional: true
|
51
|
+
),
|
52
|
+
FastlaneCore::ConfigItem.new(
|
53
|
+
key: :style,
|
54
|
+
env_name: 'BUILDKITE_ANNOTATION_STYLE',
|
55
|
+
description: 'The style of the annotation (`success`, `info`, `warning` or `error`)',
|
56
|
+
type: String,
|
57
|
+
optional: true,
|
58
|
+
verify_block: proc do |value|
|
59
|
+
valid_values = %w[success info warning error]
|
60
|
+
next if value.nil? || valid_values.include?(value)
|
61
|
+
|
62
|
+
UI.user_error!("Invalid value `#{value}` for parameter `style`. Valid values are: #{valid_values.join(', ')}")
|
63
|
+
end
|
64
|
+
),
|
65
|
+
FastlaneCore::ConfigItem.new(
|
66
|
+
key: :message,
|
67
|
+
description: 'The message to use in the new annotation. Supports GFM-Flavored Markdown. ' \
|
68
|
+
+ 'If message is nil, any existing annotation with the provided context will be deleted',
|
69
|
+
type: String,
|
70
|
+
optional: true,
|
71
|
+
default_value: nil # nil message = delete existing annotation if any
|
72
|
+
),
|
73
|
+
]
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.authors
|
77
|
+
['Automattic']
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.is_supported?(platform)
|
81
|
+
true
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class BuildkiteMetadataAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
# Set/Add new metadata values
|
6
|
+
params[:set]&.each do |key, value|
|
7
|
+
sh('buildkite-agent', 'meta-data', 'set', key.to_s, value.to_s)
|
8
|
+
end
|
9
|
+
|
10
|
+
# Return value of existing metadata key
|
11
|
+
sh('buildkite-agent', 'meta-data', 'get', params[:get].to_s) unless params[:get].nil?
|
12
|
+
end
|
13
|
+
|
14
|
+
#####################################################
|
15
|
+
# @!group Documentation
|
16
|
+
#####################################################
|
17
|
+
|
18
|
+
def self.description
|
19
|
+
'Set/Get metadata to the current Buildkite build'
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.details
|
23
|
+
<<~DETAILS
|
24
|
+
Set and/or get metadata to the current Buildkite build.
|
25
|
+
|
26
|
+
Has to be run on a CI job (where a `buildkite-agent` is running), e.g. typically by a lane
|
27
|
+
that is triggered as part of a Buildkite CI step.
|
28
|
+
|
29
|
+
See https://buildkite.com/docs/agent/v3/cli-meta-data
|
30
|
+
DETAILS
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.available_options
|
34
|
+
[
|
35
|
+
FastlaneCore::ConfigItem.new(
|
36
|
+
key: :set,
|
37
|
+
env_name: 'BUILDKITE_METADATA_SET',
|
38
|
+
description: 'The hash of key/value pairs of the meta-data to set',
|
39
|
+
type: Hash,
|
40
|
+
optional: true,
|
41
|
+
default_value: nil
|
42
|
+
),
|
43
|
+
FastlaneCore::ConfigItem.new(
|
44
|
+
key: :get,
|
45
|
+
env_name: 'BUILDKITE_METADATA_GET',
|
46
|
+
description: 'The key of the metadata to get the value of',
|
47
|
+
type: String,
|
48
|
+
optional: true,
|
49
|
+
default_value: nil
|
50
|
+
),
|
51
|
+
]
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.return_value
|
55
|
+
'The value of the Buildkite metadata corresponding to the provided `get` key. `nil` if no `get` parameter was provided.'
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.authors
|
59
|
+
['Automattic']
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.is_supported?(platform)
|
63
|
+
true
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb
ADDED
@@ -0,0 +1,259 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class PrototypeBuildDetailsCommentAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
app_display_name = params[:app_display_name]
|
6
|
+
app_center_info = AppCenterInfo.from_params(params)
|
7
|
+
metadata = consolidate_metadata(params, app_center_info)
|
8
|
+
|
9
|
+
qr_code_url, extra_metadata = build_install_links(app_center_info, params[:download_url])
|
10
|
+
metadata.merge!(extra_metadata)
|
11
|
+
|
12
|
+
# Build the comment parts
|
13
|
+
icon_img_tag = img_tag(params[:app_icon] || app_center_info.icon, alt: app_display_name)
|
14
|
+
metadata_rows = metadata.compact.map { |key, value| "<tr><td><b>#{key}</b></td><td>#{value}</td></tr>" }
|
15
|
+
intro = "#{icon_img_tag}📲 You can test the changes from this Pull Request in <b>#{app_display_name}</b> by scanning the QR code below to install the corresponding build."
|
16
|
+
footnote = params[:footnote] || (app_center_info.org_name.nil? ? '' : DEFAULT_APP_CENTER_FOOTNOTE)
|
17
|
+
body = <<~COMMENT_BODY
|
18
|
+
<table>
|
19
|
+
<tr>
|
20
|
+
<td rowspan='#{metadata_rows.count + 1}' width='260px'><img src='#{qr_code_url}' width='250' height='250' /></td>
|
21
|
+
<td><b>App Name</b></td><td>#{icon_img_tag} #{app_display_name}</td>
|
22
|
+
</tr>
|
23
|
+
#{metadata_rows.join("\n")}
|
24
|
+
</table>
|
25
|
+
#{footnote}
|
26
|
+
COMMENT_BODY
|
27
|
+
|
28
|
+
if params[:fold]
|
29
|
+
"<details><summary>#{intro}</summary>\n#{body}</details>\n"
|
30
|
+
else
|
31
|
+
"<p>#{intro}</p>\n#{body}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
#####################################################
|
36
|
+
# @!group Helpers
|
37
|
+
#####################################################
|
38
|
+
|
39
|
+
NO_INSTALL_URL_ERROR_MESSAGE = <<~NO_URL_ERROR.freeze
|
40
|
+
No URL provided to download or install the app.
|
41
|
+
- Either use this action right after using `appcenter_upload` and provide an `app_center_org_name` (so that this action can use the link to the App Center build)
|
42
|
+
- Or provide an explicit value for the `download_url` parameter
|
43
|
+
NO_URL_ERROR
|
44
|
+
|
45
|
+
DEFAULT_APP_CENTER_FOOTNOTE = '<em>Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.</em>'.freeze
|
46
|
+
|
47
|
+
# A small model struct to consolidate and pack all the values related to App Center
|
48
|
+
#
|
49
|
+
AppCenterInfo = Struct.new(:org_name, :app_name, :display_name, :release_id, :icon, :version, :short_version, :os, :bundle_id) do
|
50
|
+
# A method to construct an AppCenterInfo instance from the action params, and infer the rest from the `lane_context` if available
|
51
|
+
def self.from_params(params)
|
52
|
+
org_name = params[:app_center_org_name]
|
53
|
+
ctx = if org_name && defined?(SharedValues::APPCENTER_BUILD_INFORMATION)
|
54
|
+
Fastlane::Actions.lane_context[SharedValues::APPCENTER_BUILD_INFORMATION] || {}
|
55
|
+
else
|
56
|
+
{}
|
57
|
+
end
|
58
|
+
app_name = params[:app_center_app_name] || ctx['app_name']
|
59
|
+
new(
|
60
|
+
org_name,
|
61
|
+
app_name,
|
62
|
+
ctx['app_display_name'] || app_name,
|
63
|
+
params[:app_center_release_id] || ctx['id'],
|
64
|
+
ctx['app_icon_url'],
|
65
|
+
ctx['version'],
|
66
|
+
ctx['short_version'],
|
67
|
+
ctx['app_os'],
|
68
|
+
ctx['bundle_identifier']
|
69
|
+
)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Builds the installation link, QR code URL and extra metadata for download links from the available info
|
74
|
+
#
|
75
|
+
# @param [AppCenterInfo] app_center_info The struct containing all the values related to App Center info
|
76
|
+
# @param [String] download_url The `download_url` parameter passed to the action, if one exists
|
77
|
+
# @return [(String, Hash<String,String>)] A tuple containing:
|
78
|
+
# - The URL for the QR Code
|
79
|
+
# - A Hash of the extra metadata key/value pairs to add to the existing metadata, to enrich them with download/install links
|
80
|
+
#
|
81
|
+
def self.build_install_links(app_center_info, download_url)
|
82
|
+
install_url = nil
|
83
|
+
extra_metadata = {}
|
84
|
+
if download_url
|
85
|
+
install_url = download_url
|
86
|
+
extra_metadata['Direct Download'] = "<a href='#{install_url}'><code>#{File.basename(install_url)}</code></a>"
|
87
|
+
end
|
88
|
+
if app_center_info.org_name && app_center_info.app_name
|
89
|
+
install_url = "https://install.appcenter.ms/orgs/#{app_center_info.org_name}/apps/#{app_center_info.app_name}/releases/#{app_center_info.release_id}"
|
90
|
+
extra_metadata['App Center Build'] = "<a href='#{install_url}'>#{app_center_info.display_name} \##{app_center_info.release_id}</a>"
|
91
|
+
end
|
92
|
+
UI.user_error!(NO_INSTALL_URL_ERROR_MESSAGE) if install_url.nil?
|
93
|
+
qr_code_url = "https://chart.googleapis.com/chart?chs=500x500&cht=qr&chl=#{CGI.escape(install_url)}&choe=UTF-8"
|
94
|
+
[qr_code_url, extra_metadata]
|
95
|
+
end
|
96
|
+
|
97
|
+
# A method to build the Hash of metadata, based on the explicit ones passed by the user as parameter + the implicit ones from `AppCenterInfo`
|
98
|
+
#
|
99
|
+
# @param [Hash<Symbol, Any>] params The action's parameters, as received by `self.run`
|
100
|
+
# @param [AppCenterInfo] app_center_info The model object containing all the values related to App Center information
|
101
|
+
# @return [Hash<String, String>] A hash of all the metadata, gathered from both the explicit and the implicit ones
|
102
|
+
#
|
103
|
+
def self.consolidate_metadata(params, app_center_info)
|
104
|
+
metadata = params[:metadata]&.transform_keys(&:to_s) || {}
|
105
|
+
metadata['Build Number'] ||= app_center_info.version
|
106
|
+
metadata['Version'] ||= app_center_info.short_version
|
107
|
+
metadata[app_center_info.os == 'Android' ? 'Application ID' : 'Bundle ID'] ||= app_center_info.bundle_id
|
108
|
+
# (Feel free to add more CI-specific env vars in the line below to support other CI providers if you need)
|
109
|
+
metadata['Commit'] ||= ENV.fetch('BUILDKITE_COMMIT', nil) || other_action.last_git_commit[:abbreviated_commit_hash]
|
110
|
+
metadata
|
111
|
+
end
|
112
|
+
|
113
|
+
# Creates an HTML `<img>` tag for an icon URL or the image URL to represent a given Buildkite emoji
|
114
|
+
#
|
115
|
+
# @param [String] url_or_emoji A `String` which can be:
|
116
|
+
# - Either a valid URI to an image
|
117
|
+
# - Or a string formatted like `:emojiname:`, using a valid Buildite emoji name as defined in https://github.com/buildkite/emojis
|
118
|
+
# @param [String] alt The alt text to use for the `<img>` tag
|
119
|
+
# @return [String] The `<img …>` tag with the proper image and alt tag
|
120
|
+
#
|
121
|
+
def self.img_tag(url_or_emoji, alt: '')
|
122
|
+
return nil if url_or_emoji.nil?
|
123
|
+
|
124
|
+
emoji = url_or_emoji.match(/:(.*):/)&.captures&.first
|
125
|
+
app_icon_url = if emoji
|
126
|
+
"https://raw.githubusercontent.com/buildkite/emojis/main/img-buildkite-64/#{emoji}.png"
|
127
|
+
elsif URI(url_or_emoji)
|
128
|
+
url_or_emoji
|
129
|
+
end
|
130
|
+
app_icon_url ? "<img alt='#{alt}' align='top' src='#{app_icon_url}' width='20px' />" : ''
|
131
|
+
end
|
132
|
+
|
133
|
+
#####################################################
|
134
|
+
# @!group Documentation
|
135
|
+
#####################################################
|
136
|
+
|
137
|
+
def self.description
|
138
|
+
'Generates a string providing all the details of a prototype build, nicely-formatted and ready to be used as a PR comment (e.g. via `comment_on_pr`).'
|
139
|
+
end
|
140
|
+
|
141
|
+
def self.details
|
142
|
+
<<~DESC
|
143
|
+
Generates a string providing all the details of a prototype build, nicely-formatted as HTML.
|
144
|
+
The returned string will typically be subsequently used by the `comment_on_pr` action to post that HTML as comment on a PR.
|
145
|
+
|
146
|
+
If you used the `appcenter_upload` lane (to upload the Prototype build to App Center) before calling this action, and pass
|
147
|
+
a value to the `app_center_org_name` parameter, then many of the parameters and metadata will be automatically extracted
|
148
|
+
from the `lane_context` provided by `appcenter_upload`, including:
|
149
|
+
|
150
|
+
- The `app_center_app_name`, `app_center_release_id` and installation URL to use for the QR code to point to that release in App Center
|
151
|
+
- The `app_icon`
|
152
|
+
- The app's Build Number / versionCode
|
153
|
+
- The app's Version / versionName
|
154
|
+
- The app's Bundle ID / Application ID
|
155
|
+
- A `footnote` mentioning the MC tool for Automatticians to add themselves to App Center
|
156
|
+
|
157
|
+
This means that if you are using App Center to distribute your Prototype Build, the only parameters you *have* to provide
|
158
|
+
to this action are `app_display_name` and `app_center_org_name`; plus, for `metadata` most of the interesting values will already be pre-filled.
|
159
|
+
|
160
|
+
Any of those implicit default values/metadata can of course be overridden by passing an explicit value to the appropriate parameter(s).
|
161
|
+
DESC
|
162
|
+
end
|
163
|
+
|
164
|
+
def self.available_options
|
165
|
+
app_center_auto = '(will be automatically extracted from `lane_context if you used `appcenter_upload` to distribute your Prototype build)'
|
166
|
+
[
|
167
|
+
FastlaneCore::ConfigItem.new(
|
168
|
+
key: :app_display_name,
|
169
|
+
env_name: 'FL_PROTOTYPE_BUILD_DETAILS_COMMENT_APP_DISPLAY_NAME',
|
170
|
+
description: 'The display name to use for the app in the comment message',
|
171
|
+
optional: false,
|
172
|
+
type: String
|
173
|
+
),
|
174
|
+
FastlaneCore::ConfigItem.new(
|
175
|
+
key: :app_center_org_name,
|
176
|
+
env_name: 'APPCENTER_OWNER_NAME', # Intentionally the same as the one used by the `appcenter_upload` action
|
177
|
+
description: 'The name of the organization in App Center (if you used `appcenter_upload` to distribute your Prototype build)',
|
178
|
+
type: String,
|
179
|
+
optional: true
|
180
|
+
),
|
181
|
+
FastlaneCore::ConfigItem.new(
|
182
|
+
key: :app_center_app_name,
|
183
|
+
env_name: 'APPCENTER_APP_NAME', # Intentionally the same as the one used by the `appcenter_upload` action
|
184
|
+
description: "The name of the app in App Center #{app_center_auto}",
|
185
|
+
type: String,
|
186
|
+
optional: true,
|
187
|
+
default_value_dynamic: true # As it will be extracted from the `lane_context`` if you used `appcenter_upload``
|
188
|
+
),
|
189
|
+
FastlaneCore::ConfigItem.new(
|
190
|
+
key: :app_center_release_id,
|
191
|
+
env_name: 'APPCENTER_RELEASE_ID',
|
192
|
+
description: "The release ID/Number in App Center #{app_center_auto}",
|
193
|
+
type: String,
|
194
|
+
optional: true,
|
195
|
+
default_value_dynamic: true # As it will be extracted from the `lane_context`` if you used `appcenter_upload``
|
196
|
+
),
|
197
|
+
FastlaneCore::ConfigItem.new(
|
198
|
+
key: :app_icon,
|
199
|
+
env_name: 'FL_PROTOTYPE_BUILD_DETAILS_COMMENT_APP_ICON',
|
200
|
+
description: "The name of an emoji from the https://github.com/buildkite/emojis list or the full image URL to use for the icon of the app in the message. #{app_center_auto}",
|
201
|
+
type: String,
|
202
|
+
optional: true,
|
203
|
+
default_value_dynamic: true # As it will be extracted from the `lane_context`` if you used `appcenter_upload``
|
204
|
+
),
|
205
|
+
FastlaneCore::ConfigItem.new(
|
206
|
+
key: :download_url,
|
207
|
+
env_name: 'FL_PROTOTYPE_BUILD_DETAILS_COMMENT_DOWNLOAD_URL',
|
208
|
+
description: 'The URL to download the build as a direct download. ' \
|
209
|
+
+ 'If you uploaded the build to App Center, we recommend leaving this nil (the comment will use the URL to the App Center build for the QR code)',
|
210
|
+
type: String,
|
211
|
+
optional: true,
|
212
|
+
default_value: nil
|
213
|
+
),
|
214
|
+
FastlaneCore::ConfigItem.new(
|
215
|
+
key: :fold,
|
216
|
+
env_name: 'FL_PROTOTYPE_BUILD_DETAILS_COMMENT_FOLD',
|
217
|
+
description: 'If true, will wrap the HTML table inside a <details> block (hidden by default)',
|
218
|
+
type: Boolean,
|
219
|
+
default_value: false
|
220
|
+
),
|
221
|
+
FastlaneCore::ConfigItem.new(
|
222
|
+
key: :metadata,
|
223
|
+
env_name: 'FL_PROTOTYPE_BUILD_DETAILS_COMMENT_METADATA',
|
224
|
+
description: 'All additional metadata (as key/value pairs) you want to include in the HTML table of the comment. ' \
|
225
|
+
+ 'If you are running this action after `appcenter_upload`, some metadata will automatically be added to this list too',
|
226
|
+
type: Hash,
|
227
|
+
optional: true,
|
228
|
+
default_value_dynamic: true # As some metadata will be auto-filled if you used `appcenter_upload`
|
229
|
+
),
|
230
|
+
FastlaneCore::ConfigItem.new(
|
231
|
+
key: :footnote,
|
232
|
+
env_name: 'FL_PROTOTYPE_BUILD_DETAILS_COMMENT_FOOTNOTE',
|
233
|
+
description: 'Optional footnote to add below the HTML table of the comment. ' \
|
234
|
+
+ 'If you are running this action after `appcenter_upload`, a default footnote for Automatticians will be used unless you provide an explicit value',
|
235
|
+
type: String,
|
236
|
+
optional: true,
|
237
|
+
default_value_dynamic: true # We have a default footnote for the case when you used App Center
|
238
|
+
),
|
239
|
+
]
|
240
|
+
end
|
241
|
+
|
242
|
+
def self.return_type
|
243
|
+
:string
|
244
|
+
end
|
245
|
+
|
246
|
+
def self.return_value
|
247
|
+
'The HTML comment containing all the relevant info about a Prototype build and links to install it'
|
248
|
+
end
|
249
|
+
|
250
|
+
def self.authors
|
251
|
+
['Automattic']
|
252
|
+
end
|
253
|
+
|
254
|
+
def self.is_supported?(platform)
|
255
|
+
true
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
259
|
+
end
|
@@ -21,10 +21,6 @@ module Fastlane
|
|
21
21
|
Fastlane::Helper::GitHelper.create_branch(@new_release_branch, from: default_branch)
|
22
22
|
UI.message 'Done!'
|
23
23
|
|
24
|
-
UI.message 'Updating glotPressKeys...' unless params[:skip_glotpress]
|
25
|
-
update_glotpress_key unless params[:skip_glotpress]
|
26
|
-
UI.message 'Done' unless params[:skip_glotpress]
|
27
|
-
|
28
24
|
UI.message 'Updating Fastlane deliver file...' unless params[:skip_deliver]
|
29
25
|
Fastlane::Helper::Ios::VersionHelper.update_fastlane_deliver(@new_short_version) unless params[:skip_deliver]
|
30
26
|
UI.message 'Done!' unless params[:skip_deliver]
|
@@ -35,7 +31,7 @@ module Fastlane
|
|
35
31
|
|
36
32
|
Fastlane::Helper::Ios::GitHelper.commit_version_bump(
|
37
33
|
include_deliverfile: !params[:skip_deliver],
|
38
|
-
include_metadata:
|
34
|
+
include_metadata: false
|
39
35
|
)
|
40
36
|
|
41
37
|
UI.message 'Done.'
|
@@ -55,16 +51,11 @@ module Fastlane
|
|
55
51
|
|
56
52
|
def self.available_options
|
57
53
|
[
|
58
|
-
FastlaneCore::ConfigItem.new(key: :skip_glotpress,
|
59
|
-
env_name: 'FL_IOS_CODEFREEZE_BUMP_SKIPGLOTPRESS',
|
60
|
-
description: 'Skips GlotPress key update',
|
61
|
-
is_string: false, # true: verifies the input is a string, false: every kind of value
|
62
|
-
default_value: false), # the default value if the user didn't provide one
|
63
54
|
FastlaneCore::ConfigItem.new(key: :skip_deliver,
|
64
55
|
env_name: 'FL_IOS_CODEFREEZE_BUMP_SKIPDELIVER',
|
65
56
|
description: 'Skips Deliver key update',
|
66
|
-
|
67
|
-
default_value: false),
|
57
|
+
type: Boolean,
|
58
|
+
default_value: false),
|
68
59
|
FastlaneCore::ConfigItem.new(key: :default_branch,
|
69
60
|
env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',
|
70
61
|
description: 'Default branch of the repository',
|
@@ -84,7 +75,7 @@ module Fastlane
|
|
84
75
|
end
|
85
76
|
|
86
77
|
def self.is_supported?(platform)
|
87
|
-
|
78
|
+
[:ios, :mac].include?(platform)
|
88
79
|
end
|
89
80
|
|
90
81
|
private
|
@@ -105,15 +96,6 @@ module Fastlane
|
|
105
96
|
UI.message("New short version: #{@new_short_version}")
|
106
97
|
UI.message("Release branch: #{@new_release_branch}")
|
107
98
|
end
|
108
|
-
|
109
|
-
def self.update_glotpress_key
|
110
|
-
dm_file = ENV['DOWNLOAD_METADATA']
|
111
|
-
if File.exist?(dm_file)
|
112
|
-
sh("sed -i '' \"s/let glotPressWhatsNewKey.*/let glotPressWhatsNewKey = \\\"v#{@new_short_version}-whats-new\\\"/\" #{dm_file}")
|
113
|
-
else
|
114
|
-
UI.user_error!("Can't find #{dm_file}.")
|
115
|
-
end
|
116
|
-
end
|
117
99
|
end
|
118
100
|
end
|
119
101
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-wpmreleasetoolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Automattic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.1.7.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 6.1.7.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: buildkit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -404,6 +404,8 @@ files:
|
|
404
404
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_shutdown_emulator_action.rb
|
405
405
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb
|
406
406
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb
|
407
|
+
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_annotate_action.rb
|
408
|
+
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_metadata_action.rb
|
407
409
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/buildkite_trigger_build_action.rb
|
408
410
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_for_toolkit_updates_action.rb
|
409
411
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/check_translation_progress.rb
|
@@ -418,6 +420,7 @@ files:
|
|
418
420
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb
|
419
421
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb
|
420
422
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb
|
423
|
+
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/prototype_build_details_comment_action.rb
|
421
424
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/removebranchprotection_action.rb
|
422
425
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setbranchprotection_action.rb
|
423
426
|
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setfrozentag_action.rb
|