fastlane-plugin-stream_actions 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70eff3c83561622f9e8fe79b9c08203718b56eaaa8f6672576b04bdfabf2c8b1
|
4
|
+
data.tar.gz: 7539c2d5c68a071535eda2b7d5a5d713158d938ed10c9f559fe83b26e91ed4ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd9721907dfc24aac39d7cb45e6fa71a0659ca830891f7db84e5e2d12dbc4d731886bb5e16ab56b92e2ad52ad205483aa7795f2c1f43b7ac78fd47738a41decc
|
7
|
+
data.tar.gz: fe971302b550f3f5395c9368e1bcfb5819e7f1052a5369d60c4ca3eb30031712c0216302c4a6185bb6ffde3493b0f3d7d803a78aa80874fb883dc28274f53c06
|
@@ -1,37 +1,39 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
|
-
class
|
3
|
+
class ReleaseIosSdkAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
|
6
|
-
|
7
|
-
version_number = ''
|
8
|
-
params[:sdk_names].each do |target|
|
9
|
-
version_number = other_action.increment_version_number_in_plist(
|
10
|
-
target: target,
|
11
|
-
version_number: params[:version],
|
12
|
-
bump_type: params[:bump_type]
|
13
|
-
)
|
14
|
-
end
|
5
|
+
podspecs = []
|
6
|
+
params[:sdk_names].each { |sdk| podspecs << "#{sdk}.podspec" }
|
15
7
|
|
16
|
-
|
8
|
+
if params[:update_version_numbers]
|
9
|
+
ensure_everything_is_set_up(params)
|
17
10
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
11
|
+
version_number = ''
|
12
|
+
params[:sdk_names].each do |target|
|
13
|
+
version_number = other_action.increment_version_number_in_plist(
|
14
|
+
target: target,
|
15
|
+
version_number: params[:version],
|
16
|
+
bump_type: params[:bump_type]
|
17
|
+
)
|
18
|
+
end
|
23
19
|
|
24
|
-
|
25
|
-
params[:sdk_names].each { |sdk| podspecs << "#{sdk}.podspec" }
|
20
|
+
ensure_release_tag_is_new(version_number)
|
26
21
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
22
|
+
changes = other_action.touch_changelog(
|
23
|
+
release_version: version_number,
|
24
|
+
github_repo: params[:github_repo],
|
25
|
+
changelog_path: params[:changelog_path]
|
26
|
+
)
|
27
|
+
|
28
|
+
podspecs.each do |podspec|
|
29
|
+
UI.user_error!("Podspec #{podspec} does not exist!") unless File.exist?(podspec)
|
30
|
+
other_action.version_bump_podspec(path: podspec, version_number: version_number)
|
31
|
+
end
|
31
32
|
|
32
|
-
|
33
|
+
sh("git checkout -b release/#{version_number}") if params[:create_pull_request]
|
33
34
|
|
34
|
-
|
35
|
+
commit_changes(version_number)
|
36
|
+
end
|
35
37
|
|
36
38
|
if params[:create_pull_request]
|
37
39
|
create_pull_request(
|
@@ -43,24 +45,37 @@ module Fastlane
|
|
43
45
|
body: changes.to_s
|
44
46
|
)
|
45
47
|
UI.success("Successfully started release #{version_number}! 🚢")
|
46
|
-
|
47
|
-
|
48
|
+
elsif params[:publish_release]
|
49
|
+
version_number ||= params[:version]
|
50
|
+
|
51
|
+
ensure_everything_is_set_up(params)
|
52
|
+
ensure_release_tag_is_new(version_number)
|
53
|
+
|
54
|
+
changes ||= other_action.read_changelog(
|
48
55
|
version: version_number,
|
49
|
-
sdk_names: params[:sdk_names],
|
50
|
-
github_repo: params[:github_repo],
|
51
|
-
github_token: params[:github_token],
|
52
|
-
check_git_status: params[:check_git_status],
|
53
|
-
check_branch: params[:check_branch],
|
54
56
|
changelog_path: params[:changelog_path]
|
55
57
|
)
|
58
|
+
|
59
|
+
release_details = other_action.set_github_release(
|
60
|
+
repository_name: params[:github_repo],
|
61
|
+
api_token: params[:github_token],
|
62
|
+
name: version_number,
|
63
|
+
tag_name: version_number,
|
64
|
+
description: changes,
|
65
|
+
commitish: ENV['BRANCH_NAME'] || other_action.git_branch
|
66
|
+
)
|
67
|
+
|
68
|
+
podspecs.each { |podspec| other_action.pod_push_safely(podspec: podspec) }
|
69
|
+
|
70
|
+
UI.success("Github release v#{version_number} was created, please visit #{release_details['html_url']} to see it! 🚢")
|
56
71
|
end
|
57
72
|
end
|
58
73
|
|
59
74
|
def self.ensure_everything_is_set_up(params)
|
60
|
-
other_action.ensure_git_branch(branch: '
|
61
|
-
other_action.ensure_git_status_clean
|
75
|
+
other_action.ensure_git_branch(branch: 'main') if params[:publish_release]
|
76
|
+
other_action.ensure_git_status_clean
|
62
77
|
|
63
|
-
UI.user_error!('Please set GITHUB_TOKEN environment value.') if
|
78
|
+
UI.user_error!('Please set GITHUB_TOKEN environment value.') if params[:github_token].nil?
|
64
79
|
|
65
80
|
if params[:version].nil? && !["patch", "minor", "major"].include?(params[:bump_type])
|
66
81
|
UI.user_error!("Please use type parameter with one of the options: type:patch, type:minor, type:major")
|
@@ -123,18 +138,6 @@ module Fastlane
|
|
123
138
|
key: :github_token,
|
124
139
|
description: 'GITHUB_TOKEN environment variable'
|
125
140
|
),
|
126
|
-
FastlaneCore::ConfigItem.new(
|
127
|
-
key: :check_git_status,
|
128
|
-
description: 'Ensure git status is clean',
|
129
|
-
is_string: false,
|
130
|
-
default_value: true
|
131
|
-
),
|
132
|
-
FastlaneCore::ConfigItem.new(
|
133
|
-
key: :check_branch,
|
134
|
-
description: 'Ensure git branch is develop',
|
135
|
-
is_string: false,
|
136
|
-
default_value: true
|
137
|
-
),
|
138
141
|
FastlaneCore::ConfigItem.new(
|
139
142
|
key: :changelog_path,
|
140
143
|
env_name: 'FL_CHANGELOG_PATH',
|
@@ -144,9 +147,21 @@ module Fastlane
|
|
144
147
|
),
|
145
148
|
FastlaneCore::ConfigItem.new(
|
146
149
|
key: :create_pull_request,
|
147
|
-
description: 'Create pull request
|
150
|
+
description: 'Create pull request from release branch to main',
|
151
|
+
is_string: false,
|
152
|
+
default_value: false
|
153
|
+
),
|
154
|
+
FastlaneCore::ConfigItem.new(
|
155
|
+
key: :update_version_numbers,
|
156
|
+
description: 'Update release version numbers in podspecs and plist files',
|
157
|
+
is_string: false,
|
158
|
+
default_value: false
|
159
|
+
),
|
160
|
+
FastlaneCore::ConfigItem.new(
|
161
|
+
key: :publish_release,
|
162
|
+
description: 'Publish release to GitHub and CocoaPods',
|
148
163
|
is_string: false,
|
149
|
-
default_value:
|
164
|
+
default_value: false
|
150
165
|
)
|
151
166
|
]
|
152
167
|
end
|
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.2
|
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-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -233,12 +233,11 @@ files:
|
|
233
233
|
- lib/fastlane/plugin/stream_actions/actions/allure_create_testcase.rb
|
234
234
|
- lib/fastlane/plugin/stream_actions/actions/allure_run_testplan.rb
|
235
235
|
- lib/fastlane/plugin/stream_actions/actions/custom_match.rb
|
236
|
-
- lib/fastlane/plugin/stream_actions/actions/ios_sdk_release.rb
|
237
236
|
- lib/fastlane/plugin/stream_actions/actions/is_check_required.rb
|
238
237
|
- lib/fastlane/plugin/stream_actions/actions/pod_push_safely.rb
|
239
238
|
- lib/fastlane/plugin/stream_actions/actions/prepare_simulator.rb
|
240
|
-
- lib/fastlane/plugin/stream_actions/actions/publish_ios_sdk_release.rb
|
241
239
|
- lib/fastlane/plugin/stream_actions/actions/read_changelog.rb
|
240
|
+
- lib/fastlane/plugin/stream_actions/actions/release_ios_sdk.rb
|
242
241
|
- lib/fastlane/plugin/stream_actions/actions/retrieve_xctest_names.rb
|
243
242
|
- lib/fastlane/plugin/stream_actions/actions/testflight_build.rb
|
244
243
|
- lib/fastlane/plugin/stream_actions/actions/touch_changelog.rb
|
@@ -1,109 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class PublishIosSdkReleaseAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
ensure_everything_is_set_up(params)
|
6
|
-
ensure_release_tag_is_new(params[:version])
|
7
|
-
|
8
|
-
changes = other_action.read_changelog(
|
9
|
-
version: params[:version],
|
10
|
-
changelog_path: params[:changelog_path]
|
11
|
-
)
|
12
|
-
|
13
|
-
podspecs = []
|
14
|
-
params[:sdk_names].each { |sdk| podspecs << "#{sdk}.podspec" }
|
15
|
-
|
16
|
-
release_details = other_action.set_github_release(
|
17
|
-
repository_name: params[:github_repo],
|
18
|
-
api_token: params[:github_token],
|
19
|
-
name: params[:version],
|
20
|
-
tag_name: params[:version],
|
21
|
-
description: changes,
|
22
|
-
commitish: ENV['BRANCH_NAME'] || other_action.git_branch
|
23
|
-
)
|
24
|
-
|
25
|
-
podspecs.each { |podspec| other_action.pod_push_safely(podspec: podspec, sync: params[:pod_sync] & true) }
|
26
|
-
|
27
|
-
UI.success("Github release v#{params[:version]} was created, please visit #{release_details['html_url']} to see it! 🚢")
|
28
|
-
end
|
29
|
-
|
30
|
-
def self.ensure_everything_is_set_up(params)
|
31
|
-
other_action.ensure_git_branch(branch: 'main') if params[:check_branch]
|
32
|
-
other_action.ensure_git_status_clean if params[:check_git_status]
|
33
|
-
end
|
34
|
-
|
35
|
-
def self.ensure_release_tag_is_new(version_number)
|
36
|
-
if other_action.git_tag_exists(tag: version_number)
|
37
|
-
UI.user_error!("Tag for version #{version_number} already exists!")
|
38
|
-
else
|
39
|
-
UI.success("Ignore the red warning above. Tag for version #{version_number} is alright!")
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
#####################################################
|
44
|
-
# @!group Documentation
|
45
|
-
#####################################################
|
46
|
-
|
47
|
-
def self.description
|
48
|
-
'Publishes iOS SDKs to GitHub and CocoaPods'
|
49
|
-
end
|
50
|
-
|
51
|
-
def self.available_options
|
52
|
-
[
|
53
|
-
FastlaneCore::ConfigItem.new(
|
54
|
-
key: :version,
|
55
|
-
description: 'Release version',
|
56
|
-
optional: true
|
57
|
-
),
|
58
|
-
FastlaneCore::ConfigItem.new(
|
59
|
-
key: :sdk_names,
|
60
|
-
description: 'SDK names to release',
|
61
|
-
is_string: false,
|
62
|
-
verify_block: proc do |sdks|
|
63
|
-
UI.user_error!("SDK names array has to be specified") unless sdks.kind_of?(Array) && sdks.size.positive?
|
64
|
-
end
|
65
|
-
),
|
66
|
-
FastlaneCore::ConfigItem.new(
|
67
|
-
env_name: 'GITHUB_REPOSITORY',
|
68
|
-
key: :github_repo,
|
69
|
-
description: 'Github repository name'
|
70
|
-
),
|
71
|
-
FastlaneCore::ConfigItem.new(
|
72
|
-
env_name: 'GITHUB_TOKEN',
|
73
|
-
key: :github_token,
|
74
|
-
description: 'GITHUB_TOKEN environment variable'
|
75
|
-
),
|
76
|
-
FastlaneCore::ConfigItem.new(
|
77
|
-
key: :check_git_status,
|
78
|
-
description: 'Ensure git status is clean',
|
79
|
-
is_string: false,
|
80
|
-
default_value: true
|
81
|
-
),
|
82
|
-
FastlaneCore::ConfigItem.new(
|
83
|
-
key: :check_branch,
|
84
|
-
description: 'Ensure git branch is main',
|
85
|
-
is_string: false,
|
86
|
-
default_value: true
|
87
|
-
),
|
88
|
-
FastlaneCore::ConfigItem.new(
|
89
|
-
key: :pod_sync,
|
90
|
-
description: 'If validation depends on other recently pushed pods, synchronize',
|
91
|
-
is_string: false,
|
92
|
-
default_value: false
|
93
|
-
),
|
94
|
-
FastlaneCore::ConfigItem.new(
|
95
|
-
key: :changelog_path,
|
96
|
-
env_name: 'FL_CHANGELOG_PATH',
|
97
|
-
description: 'The path to your project CHANGELOG.md',
|
98
|
-
is_string: true,
|
99
|
-
default_value: './CHANGELOG.md'
|
100
|
-
)
|
101
|
-
]
|
102
|
-
end
|
103
|
-
|
104
|
-
def self.supported?(_platform)
|
105
|
-
[:ios].include?(platform)
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|