fastlane-plugin-stream_actions 0.3.3 → 0.3.5
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/publish_ios_sdk.rb +113 -0
- data/lib/fastlane/plugin/stream_actions/actions/release_ios_sdk.rb +27 -72
- data/lib/fastlane/plugin/stream_actions/actions/testflight_build.rb +11 -1
- data/lib/fastlane/plugin/stream_actions/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2348c066c6f7b3b07a3e04f65e613ed12870b6134e58ab0890dc375aceb123d3
|
4
|
+
data.tar.gz: b94be2c268cc235aeef8fa541a2563a63b30081213dbfc696da9b79793eb980d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fccb0bf830acc4366a2171f01616df0666e60e7adc8dbb0affcf62d5311dc59a846d783370d25605407274f8ec9a9f6aabea0cb4ce8b6d1622045ce225626128
|
7
|
+
data.tar.gz: ba1b73d15649bbb8906a2f1ab044ad1af810b71e696a26686fdff59bf63caf2bbc8f9d7c7a1d990c9c09fd4bde85aabe6b760011e5037eadf88e505f4ac26ca4
|
@@ -0,0 +1,113 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class PublishIosSdkAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
podspecs = []
|
6
|
+
(params[:podspec_names] || params[:sdk_names]).each do |sdk|
|
7
|
+
podspecs << (sdk.include?('.podspec') ? sdk : "#{sdk}.podspec")
|
8
|
+
end
|
9
|
+
|
10
|
+
version_number = params[:version]
|
11
|
+
|
12
|
+
ensure_everything_is_set_up(params)
|
13
|
+
ensure_release_tag_is_new(version_number)
|
14
|
+
|
15
|
+
changes = other_action.read_changelog(
|
16
|
+
version: version_number,
|
17
|
+
changelog_path: params[:changelog_path]
|
18
|
+
)
|
19
|
+
|
20
|
+
release_details = other_action.set_github_release(
|
21
|
+
repository_name: params[:github_repo],
|
22
|
+
api_token: params[:github_token],
|
23
|
+
name: version_number,
|
24
|
+
tag_name: version_number,
|
25
|
+
description: changes,
|
26
|
+
commitish: ENV['BRANCH_NAME'] || other_action.git_branch,
|
27
|
+
upload_assets: params[:upload_assets]
|
28
|
+
)
|
29
|
+
|
30
|
+
podspecs.each { |podspec| other_action.pod_push_safely(podspec: podspec) }
|
31
|
+
|
32
|
+
UI.success("Github release v#{version_number} was created, please visit #{release_details['html_url']} to see it! 🚢")
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.ensure_everything_is_set_up(params)
|
36
|
+
# other_action.ensure_git_branch(branch: 'main')
|
37
|
+
other_action.ensure_git_status_clean unless params[:skip_git_status_check]
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.ensure_release_tag_is_new(version_number)
|
41
|
+
if other_action.git_tag_exists(tag: version_number)
|
42
|
+
UI.user_error!("Tag for version #{version_number} already exists!")
|
43
|
+
else
|
44
|
+
UI.success("Ignore the red warning above. Tag for version #{version_number} is alright!")
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
#####################################################
|
49
|
+
# @!group Documentation
|
50
|
+
#####################################################
|
51
|
+
|
52
|
+
def self.description
|
53
|
+
'Publish iOS SDKs'
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.available_options
|
57
|
+
[
|
58
|
+
FastlaneCore::ConfigItem.new(
|
59
|
+
key: :version,
|
60
|
+
description: 'Release version (not required if release type is set)'
|
61
|
+
),
|
62
|
+
FastlaneCore::ConfigItem.new(
|
63
|
+
key: :sdk_names,
|
64
|
+
description: 'SDK names to release',
|
65
|
+
is_string: false,
|
66
|
+
verify_block: proc do |sdks|
|
67
|
+
UI.user_error!("SDK names array has to be specified") unless sdks.kind_of?(Array) && sdks.size.positive?
|
68
|
+
end
|
69
|
+
),
|
70
|
+
FastlaneCore::ConfigItem.new(
|
71
|
+
key: :podspec_names,
|
72
|
+
description: 'Podspec names to release',
|
73
|
+
is_string: false,
|
74
|
+
optional: true
|
75
|
+
),
|
76
|
+
FastlaneCore::ConfigItem.new(
|
77
|
+
env_name: 'GITHUB_REPOSITORY',
|
78
|
+
key: :github_repo,
|
79
|
+
description: 'Github repository name'
|
80
|
+
),
|
81
|
+
FastlaneCore::ConfigItem.new(
|
82
|
+
env_name: 'GITHUB_TOKEN',
|
83
|
+
key: :github_token,
|
84
|
+
description: 'GITHUB_TOKEN environment variable'
|
85
|
+
),
|
86
|
+
FastlaneCore::ConfigItem.new(
|
87
|
+
key: :skip_git_status_check,
|
88
|
+
description: 'Skip git status check',
|
89
|
+
is_string: false,
|
90
|
+
optional: true
|
91
|
+
),
|
92
|
+
FastlaneCore::ConfigItem.new(
|
93
|
+
key: :changelog_path,
|
94
|
+
env_name: 'FL_CHANGELOG_PATH',
|
95
|
+
description: 'The path to your project CHANGELOG.md',
|
96
|
+
is_string: true,
|
97
|
+
default_value: './CHANGELOG.md'
|
98
|
+
),
|
99
|
+
FastlaneCore::ConfigItem.new(
|
100
|
+
key: :upload_assets,
|
101
|
+
description: 'Path to assets to be uploaded with the release',
|
102
|
+
is_string: false,
|
103
|
+
optional: true
|
104
|
+
)
|
105
|
+
]
|
106
|
+
end
|
107
|
+
|
108
|
+
def self.supported?(_platform)
|
109
|
+
[:ios].include?(platform)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -7,38 +7,36 @@ module Fastlane
|
|
7
7
|
podspecs << (sdk.include?('.podspec') ? sdk : "#{sdk}.podspec")
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
bump_type: params[:bump_type]
|
19
|
-
)
|
20
|
-
end
|
21
|
-
|
22
|
-
ensure_release_tag_is_new(version_number)
|
23
|
-
|
24
|
-
changes = other_action.touch_changelog(
|
25
|
-
release_version: version_number,
|
26
|
-
github_repo: params[:github_repo],
|
27
|
-
changelog_path: params[:changelog_path]
|
10
|
+
ensure_everything_is_set_up(params)
|
11
|
+
|
12
|
+
version_number = ''
|
13
|
+
params[:sdk_names].each do |target|
|
14
|
+
version_number = other_action.increment_version_number_in_plist(
|
15
|
+
target: target,
|
16
|
+
version_number: params[:version],
|
17
|
+
bump_type: params[:bump_type]
|
28
18
|
)
|
19
|
+
end
|
29
20
|
|
30
|
-
|
31
|
-
UI.user_error!("Podspec #{podspec} does not exist!") unless File.exist?(podspec)
|
32
|
-
other_action.version_bump_podspec(path: podspec, version_number: version_number)
|
33
|
-
end
|
34
|
-
|
35
|
-
params[:extra_changes].call(version_number) if params[:extra_changes]
|
21
|
+
ensure_release_tag_is_new(version_number)
|
36
22
|
|
37
|
-
|
23
|
+
changes = other_action.touch_changelog(
|
24
|
+
release_version: version_number,
|
25
|
+
github_repo: params[:github_repo],
|
26
|
+
changelog_path: params[:changelog_path]
|
27
|
+
)
|
38
28
|
|
39
|
-
|
29
|
+
podspecs.each do |podspec|
|
30
|
+
UI.user_error!("Podspec #{podspec} does not exist!") unless File.exist?(podspec)
|
31
|
+
other_action.version_bump_podspec(path: podspec, version_number: version_number)
|
40
32
|
end
|
41
33
|
|
34
|
+
params[:extra_changes].call(version_number) if params[:extra_changes]
|
35
|
+
|
36
|
+
sh("git checkout -b release/#{version_number}") if params[:create_pull_request]
|
37
|
+
|
38
|
+
commit_changes(version_number)
|
39
|
+
|
42
40
|
if params[:create_pull_request]
|
43
41
|
create_pull_request(
|
44
42
|
api_token: params[:github_token],
|
@@ -48,40 +46,15 @@ module Fastlane
|
|
48
46
|
base: 'main',
|
49
47
|
body: changes.to_s
|
50
48
|
)
|
51
|
-
UI.success("Successfully started release #{version_number}! 🚢")
|
52
|
-
elsif params[:publish_release]
|
53
|
-
version_number ||= params[:version]
|
54
|
-
|
55
|
-
ensure_everything_is_set_up(params)
|
56
|
-
ensure_release_tag_is_new(version_number)
|
57
|
-
|
58
|
-
changes ||= other_action.read_changelog(
|
59
|
-
version: version_number,
|
60
|
-
changelog_path: params[:changelog_path]
|
61
|
-
)
|
62
|
-
|
63
|
-
release_details = other_action.set_github_release(
|
64
|
-
repository_name: params[:github_repo],
|
65
|
-
api_token: params[:github_token],
|
66
|
-
name: version_number,
|
67
|
-
tag_name: version_number,
|
68
|
-
description: changes,
|
69
|
-
commitish: ENV['BRANCH_NAME'] || other_action.git_branch,
|
70
|
-
upload_assets: params[:upload_assets]
|
71
|
-
)
|
72
|
-
|
73
|
-
podspecs.each { |podspec| other_action.pod_push_safely(podspec: podspec) }
|
74
|
-
|
75
|
-
UI.success("Github release v#{version_number} was created, please visit #{release_details['html_url']} to see it! 🚢")
|
76
49
|
end
|
50
|
+
|
51
|
+
UI.success("Successfully started release #{version_number}! 🚢")
|
52
|
+
version_number
|
77
53
|
end
|
78
54
|
|
79
55
|
def self.ensure_everything_is_set_up(params)
|
80
|
-
other_action.ensure_git_branch(branch: 'main') if params[:publish_release]
|
81
56
|
other_action.ensure_git_status_clean unless params[:skip_git_status_check]
|
82
57
|
|
83
|
-
UI.user_error!('Please set GITHUB_TOKEN environment value.') if params[:github_token].nil?
|
84
|
-
|
85
58
|
if params[:version].nil? && !["patch", "minor", "major"].include?(params[:bump_type])
|
86
59
|
UI.user_error!("Please use type parameter with one of the options: type:patch, type:minor, type:major")
|
87
60
|
end
|
@@ -173,24 +146,6 @@ module Fastlane
|
|
173
146
|
description: 'Create pull request from release branch to main',
|
174
147
|
is_string: false,
|
175
148
|
default_value: false
|
176
|
-
),
|
177
|
-
FastlaneCore::ConfigItem.new(
|
178
|
-
key: :update_version_numbers,
|
179
|
-
description: 'Update release version numbers in podspecs and plist files',
|
180
|
-
is_string: false,
|
181
|
-
default_value: false
|
182
|
-
),
|
183
|
-
FastlaneCore::ConfigItem.new(
|
184
|
-
key: :publish_release,
|
185
|
-
description: 'Publish release to GitHub and CocoaPods',
|
186
|
-
is_string: false,
|
187
|
-
default_value: false
|
188
|
-
),
|
189
|
-
FastlaneCore::ConfigItem.new(
|
190
|
-
key: :upload_assets,
|
191
|
-
description: 'Path to assets to be uploaded with the release',
|
192
|
-
is_string: false,
|
193
|
-
optional: true
|
194
149
|
)
|
195
150
|
]
|
196
151
|
end
|
@@ -6,7 +6,11 @@ module Fastlane
|
|
6
6
|
app_identifier: params[:app_identifier],
|
7
7
|
api_key: params[:api_key]
|
8
8
|
) + 1
|
9
|
-
|
9
|
+
|
10
|
+
targets = params[:extensions] << params[:app_target]
|
11
|
+
targets.each do |target|
|
12
|
+
other_action.increment_build_number_in_plist(build_number: build_number.to_s, target: target)
|
13
|
+
end
|
10
14
|
|
11
15
|
other_action.gym(
|
12
16
|
project: params[:xcode_project],
|
@@ -92,6 +96,12 @@ module Fastlane
|
|
92
96
|
UI.user_error!('DemoApp target name has to be specified') if target.nil? || target.empty?
|
93
97
|
end
|
94
98
|
),
|
99
|
+
FastlaneCore::ConfigItem.new(
|
100
|
+
key: :extensions,
|
101
|
+
description: 'Extensions/dependencies target names to bump build number',
|
102
|
+
is_string: false,
|
103
|
+
default_value: []
|
104
|
+
),
|
95
105
|
FastlaneCore::ConfigItem.new(
|
96
106
|
key: :app_identifier,
|
97
107
|
description: 'DemoApp bundle identifier',
|
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.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GetStream
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -236,6 +236,7 @@ files:
|
|
236
236
|
- lib/fastlane/plugin/stream_actions/actions/is_check_required.rb
|
237
237
|
- lib/fastlane/plugin/stream_actions/actions/pod_push_safely.rb
|
238
238
|
- lib/fastlane/plugin/stream_actions/actions/prepare_simulator.rb
|
239
|
+
- lib/fastlane/plugin/stream_actions/actions/publish_ios_sdk.rb
|
239
240
|
- lib/fastlane/plugin/stream_actions/actions/read_changelog.rb
|
240
241
|
- lib/fastlane/plugin/stream_actions/actions/release_ios_sdk.rb
|
241
242
|
- lib/fastlane/plugin/stream_actions/actions/retrieve_xctest_names.rb
|