fastlane-plugin-stream_actions 0.1.14 → 0.1.16
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/stream_actions/actions/custom_match.rb +1 -1
- data/lib/fastlane/plugin/stream_actions/actions/is_check_required.rb +6 -5
- data/lib/fastlane/plugin/stream_actions/actions/read_changelog.rb +1 -3
- data/lib/fastlane/plugin/stream_actions/actions/release_ios_sdk.rb +2 -2
- data/lib/fastlane/plugin/stream_actions/actions/testflight_build.rb +8 -8
- data/lib/fastlane/plugin/stream_actions/actions/touch_changelog.rb +15 -27
- data/lib/fastlane/plugin/stream_actions/actions/update_testplan.rb +9 -6
- data/lib/fastlane/plugin/stream_actions/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4f4cb310ffff11e9c81c8b5838906e12e70375acf736733c36750ac69fbf873
|
4
|
+
data.tar.gz: 5f79a9699b893bc7000215f5fc3b705fa7f7cf1836b6f35677e73f4ee71b6803
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c93a99d94c8163f649b4603a51176f026e35ab360c1d5ba17298a7c2d6e7cf54605a5709e5d7db15dc429d3823623f6d0527dab809c9ea52105347e96c798ad1
|
7
|
+
data.tar.gz: ed5168b819dec5dec92d76cd5d63b0d486e7b7671fb651f7e497ec691be6a28756767b6790729644c656fbc615a4beeb8077b8fe1aeeb1d75914702bcd36a873
|
@@ -35,7 +35,7 @@ module Fastlane
|
|
35
35
|
description: 'AppStore Connect API Key',
|
36
36
|
is_string: false,
|
37
37
|
verify_block: proc do |api_key|
|
38
|
-
UI.user_error!('AppStore Connect API Key has to be specified')
|
38
|
+
UI.user_error!('AppStore Connect API Key has to be specified') if api_key.nil? || api_key.empty? || !api_key.kind_of?(Hash)
|
39
39
|
end
|
40
40
|
),
|
41
41
|
FastlaneCore::ConfigItem.new(
|
@@ -2,11 +2,11 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class IsCheckRequiredAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
return true
|
5
|
+
return true if params[:github_pr_num].nil? || params[:github_pr_num].empty?
|
6
6
|
|
7
7
|
UI.message("Checking if check is required for PR ##{params[:github_pr_num]}")
|
8
8
|
|
9
|
-
changed_files = sh("gh pr view #{params[:github_pr_num]} --json files -q '.files[].path'").split("\n")
|
9
|
+
changed_files = Actions.sh("gh pr view #{params[:github_pr_num]} --json files -q '.files[].path'").split("\n")
|
10
10
|
|
11
11
|
return true if changed_files.size == 100 # TODO: https://github.com/cli/cli/issues/5368
|
12
12
|
|
@@ -31,14 +31,15 @@ module Fastlane
|
|
31
31
|
key: :sources,
|
32
32
|
description: 'Array of paths to scan',
|
33
33
|
is_string: false,
|
34
|
-
verify_block: proc do |
|
35
|
-
UI.user_error!("Sources have to be specified") unless
|
34
|
+
verify_block: proc do |array|
|
35
|
+
UI.user_error!("Sources have to be specified") unless array.kind_of?(Array) && array.size.positive?
|
36
36
|
end
|
37
37
|
),
|
38
38
|
FastlaneCore::ConfigItem.new(
|
39
39
|
env_name: 'GITHUB_PR_NUM',
|
40
40
|
key: :github_pr_num,
|
41
|
-
description: 'GitHub PR number'
|
41
|
+
description: 'GitHub PR number',
|
42
|
+
optional: true
|
42
43
|
)
|
43
44
|
]
|
44
45
|
end
|
@@ -2,8 +2,6 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class ReadChangelogAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
UI.user_error!('You need to pass the version of the release you want to obtain the changelog from') unless params[:version]
|
6
|
-
|
7
5
|
UI.message("Getting changelog for #{params[:version]}")
|
8
6
|
reading_changelog = false
|
9
7
|
changes = ''
|
@@ -38,7 +36,7 @@ module Fastlane
|
|
38
36
|
key: :version,
|
39
37
|
description: 'Release version',
|
40
38
|
verify_block: proc do |v|
|
41
|
-
UI.user_error!("You need to pass the version of the release you want to obtain the changelog from")
|
39
|
+
UI.user_error!("You need to pass the version of the release you want to obtain the changelog from") if v.nil? || v.empty?
|
42
40
|
end
|
43
41
|
),
|
44
42
|
FastlaneCore::ConfigItem.new(
|
@@ -30,7 +30,7 @@ module Fastlane
|
|
30
30
|
|
31
31
|
release_details = other_action.set_github_release(
|
32
32
|
repository_name: params[:github_repo],
|
33
|
-
api_token:
|
33
|
+
api_token: params[:github_token],
|
34
34
|
name: version_number,
|
35
35
|
tag_name: version_number,
|
36
36
|
description: changes,
|
@@ -115,7 +115,7 @@ module Fastlane
|
|
115
115
|
FastlaneCore::ConfigItem.new(
|
116
116
|
env_name: 'GITHUB_TOKEN',
|
117
117
|
key: :github_token,
|
118
|
-
description: 'GITHUB_TOKEN
|
118
|
+
description: 'GITHUB_TOKEN environment variable'
|
119
119
|
),
|
120
120
|
FastlaneCore::ConfigItem.new(
|
121
121
|
key: :check_git_status,
|
@@ -47,9 +47,9 @@ module Fastlane
|
|
47
47
|
"This is the build for Regression testing on release candidate v#{version_number} (sha: #{sha})."
|
48
48
|
else
|
49
49
|
"This is the official sample app built with iOS #{params[:sdk_target]} SDK v#{version_number}. It's designed " \
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
'to highlight engaging features and new improvements to the SDK, but remember that this is just one ' \
|
51
|
+
'possible implementation. You can start your own by borrowing and customizing the code from this ' \
|
52
|
+
"sample, or build something completely different using Stream's components."
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -68,35 +68,35 @@ module Fastlane
|
|
68
68
|
description: 'AppStore Connect API Key',
|
69
69
|
is_string: false,
|
70
70
|
verify_block: proc do |api_key|
|
71
|
-
UI.user_error!('AppStore Connect API Key has to be specified')
|
71
|
+
UI.user_error!('AppStore Connect API Key has to be specified') if api_key.nil? || api_key.empty?
|
72
72
|
end
|
73
73
|
),
|
74
74
|
FastlaneCore::ConfigItem.new(
|
75
75
|
key: :xcode_project,
|
76
76
|
description: 'Path to the Xcode project',
|
77
77
|
verify_block: proc do |path|
|
78
|
-
UI.user_error!('Path to the Xcode project has to be specified')
|
78
|
+
UI.user_error!('Path to the Xcode project has to be specified') if path.nil? || path.empty?
|
79
79
|
end
|
80
80
|
),
|
81
81
|
FastlaneCore::ConfigItem.new(
|
82
82
|
key: :sdk_target,
|
83
83
|
description: 'SDK target name',
|
84
84
|
verify_block: proc do |target|
|
85
|
-
UI.user_error!('SDK target name has to be specified')
|
85
|
+
UI.user_error!('SDK target name has to be specified') if target.nil? || target.empty?
|
86
86
|
end
|
87
87
|
),
|
88
88
|
FastlaneCore::ConfigItem.new(
|
89
89
|
key: :app_target,
|
90
90
|
description: 'DemoApp target name',
|
91
91
|
verify_block: proc do |target|
|
92
|
-
UI.user_error!('DemoApp target name has to be specified')
|
92
|
+
UI.user_error!('DemoApp target name has to be specified') if target.nil? || target.empty?
|
93
93
|
end
|
94
94
|
),
|
95
95
|
FastlaneCore::ConfigItem.new(
|
96
96
|
key: :app_identifier,
|
97
97
|
description: 'DemoApp bundle identifier',
|
98
98
|
verify_block: proc do |id|
|
99
|
-
UI.user_error!('DemoApp bundle identifier has to be specified')
|
99
|
+
UI.user_error!('DemoApp bundle identifier has to be specified') if id.nil? || id.empty?
|
100
100
|
end
|
101
101
|
),
|
102
102
|
FastlaneCore::ConfigItem.new(
|
@@ -2,42 +2,38 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class TouchChangelogAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
|
6
|
-
release_version = params[:release_version] unless params[:release_version].to_s.empty?
|
5
|
+
UI.message("Starting to update '#{params[:changelog_path]}'")
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
file_data = File.readlines(changelog_path)
|
7
|
+
file_data = File.readlines(params[:changelog_path])
|
11
8
|
upcoming_line = -1
|
12
9
|
changes_since_last_release = ''
|
13
10
|
|
14
|
-
File.open(changelog_path).each.with_index do |line, index|
|
11
|
+
File.open(params[:changelog_path]).each.with_index do |line, index|
|
15
12
|
if upcoming_line != -1
|
16
|
-
if line.start_with?('# [')
|
17
|
-
|
18
|
-
|
19
|
-
changes_since_last_release += line
|
20
|
-
end
|
13
|
+
break if line.start_with?('# [')
|
14
|
+
|
15
|
+
changes_since_last_release += line
|
21
16
|
elsif line == "# Upcoming\n"
|
22
17
|
upcoming_line = index
|
23
18
|
end
|
24
19
|
end
|
25
20
|
|
26
|
-
file_data[upcoming_line] = "# [#{release_version}](https://github.com/#{params[:github_repo]}/releases/tag/#{release_version})"
|
21
|
+
file_data[upcoming_line] = "# [#{params[:release_version]}](https://github.com/#{params[:github_repo]}/releases/tag/#{params[:release_version]})"
|
27
22
|
|
28
23
|
today = Time.now.strftime('%B %d, %Y')
|
24
|
+
|
29
25
|
file_data.insert(upcoming_line + 1, "_#{today}_")
|
30
26
|
file_data.insert(upcoming_line, '# Upcoming')
|
31
27
|
file_data.insert(upcoming_line + 1, '')
|
32
28
|
file_data.insert(upcoming_line + 2, '### 🔄 Changed')
|
33
29
|
file_data.insert(upcoming_line + 3, '')
|
34
30
|
|
35
|
-
|
36
|
-
changelog = File.open(changelog_path, 'w')
|
31
|
+
changelog = File.open(params[:changelog_path], 'w')
|
37
32
|
changelog.puts(file_data)
|
38
33
|
changelog.close
|
39
|
-
UI.success("Successfully updated #{changelog_path}")
|
40
|
-
|
34
|
+
UI.success("Successfully updated #{params[:changelog_path]}")
|
35
|
+
|
36
|
+
changes_since_last_release
|
41
37
|
end
|
42
38
|
|
43
39
|
#####################################################
|
@@ -57,24 +53,16 @@ module Fastlane
|
|
57
53
|
FastlaneCore::ConfigItem.new(
|
58
54
|
key: :github_repo,
|
59
55
|
env_name: 'GITHUB_REPOSITORY',
|
60
|
-
description: 'The owner and repository name. For example, octocat/Hello-World'
|
61
|
-
is_string: true
|
56
|
+
description: 'The owner and repository name. For example, octocat/Hello-World'
|
62
57
|
),
|
63
58
|
FastlaneCore::ConfigItem.new(
|
64
59
|
key: :changelog_path,
|
65
|
-
env_name: 'FL_CHANGELOG_PATH',
|
66
60
|
description: 'The path to your project CHANGELOG.md',
|
67
|
-
|
68
|
-
default_value: './CHANGELOG.md',
|
69
|
-
optional: true
|
61
|
+
default_value: './CHANGELOG.md'
|
70
62
|
),
|
71
63
|
FastlaneCore::ConfigItem.new(
|
72
64
|
key: :release_version,
|
73
|
-
|
74
|
-
description: 'The release version, according to semantic versioning',
|
75
|
-
is_string: true,
|
76
|
-
default_value: '',
|
77
|
-
optional: false
|
65
|
+
description: 'The release version, according to semantic versioning'
|
78
66
|
)
|
79
67
|
]
|
80
68
|
end
|
@@ -4,14 +4,17 @@ module Fastlane
|
|
4
4
|
def self.run(params)
|
5
5
|
data_hash = JSON.parse(File.read(params[:path]))
|
6
6
|
|
7
|
-
# Create the `environmentVariableEntries` array if it doesn't exist
|
8
7
|
data_hash['defaultOptions']['environmentVariableEntries'] ||= []
|
9
8
|
|
10
|
-
|
9
|
+
if params[:env_vars].kind_of?(Hash)
|
10
|
+
data_hash['defaultOptions']['environmentVariableEntries'] << params[:env_vars]
|
11
|
+
else
|
12
|
+
params[:env_vars].each { |env| data_hash['defaultOptions']['environmentVariableEntries'] << env }
|
13
|
+
end
|
14
|
+
|
11
15
|
File.write(params[:path], JSON.pretty_generate(data_hash))
|
12
16
|
|
13
|
-
UI.
|
14
|
-
UI.message("👀 #{params[:path]} ENV variables:\n#{data_hash['defaultOptions']['environmentVariableEntries']}")
|
17
|
+
UI.message("👀 Testplan environment variables:\n#{data_hash['defaultOptions']['environmentVariableEntries']}")
|
15
18
|
end
|
16
19
|
|
17
20
|
#####################################################
|
@@ -35,8 +38,8 @@ module Fastlane
|
|
35
38
|
key: :env_vars,
|
36
39
|
description: 'The environment variables to add to test plan',
|
37
40
|
is_string: false,
|
38
|
-
verify_block: proc do |
|
39
|
-
UI.user_error!("The environment variables array should not be empty") if
|
41
|
+
verify_block: proc do |env_vars|
|
42
|
+
UI.user_error!("The environment variables array should not be empty") if env_vars.nil? || env_vars.empty?
|
40
43
|
end
|
41
44
|
)
|
42
45
|
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-stream_actions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GetStream
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.
|
131
|
+
version: '1.38'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.
|
138
|
+
version: '1.38'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rubocop-performance
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - '='
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 2.
|
187
|
+
version: 2.15.0
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - '='
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 2.
|
194
|
+
version: 2.15.0
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: simplecov
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -239,7 +239,8 @@ files:
|
|
239
239
|
- lib/fastlane/plugin/stream_actions/version.rb
|
240
240
|
homepage: https://github.com/GetStream/fastlane-plugin-stream_actions
|
241
241
|
licenses: []
|
242
|
-
metadata:
|
242
|
+
metadata:
|
243
|
+
rubygems_mfa_required: 'true'
|
243
244
|
post_install_message:
|
244
245
|
rdoc_options: []
|
245
246
|
require_paths:
|