fastlane-plugin-stream_actions 0.3.0 → 0.3.2
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
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,110 +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
|
-
github_repo: params[:github_repo],
|
11
|
-
changelog_path: params[:changelog_path]
|
12
|
-
)
|
13
|
-
|
14
|
-
podspecs = []
|
15
|
-
params[:sdk_names].each { |sdk| podspecs << "#{sdk}.podspec" }
|
16
|
-
|
17
|
-
release_details = other_action.set_github_release(
|
18
|
-
repository_name: params[:github_repo],
|
19
|
-
api_token: params[:github_token],
|
20
|
-
name: params[:version],
|
21
|
-
tag_name: params[:version],
|
22
|
-
description: changes,
|
23
|
-
commitish: ENV['BRANCH_NAME'] || other_action.git_branch
|
24
|
-
)
|
25
|
-
|
26
|
-
podspecs.each { |podspec| other_action.pod_push_safely(podspec: podspec, sync: params[:pod_sync] & true) }
|
27
|
-
|
28
|
-
UI.success("Github release v#{params[:version]} was created, please visit #{release_details['html_url']} to see it! 🚢")
|
29
|
-
end
|
30
|
-
|
31
|
-
def self.ensure_everything_is_set_up(params)
|
32
|
-
other_action.ensure_git_branch(branch: 'main') if params[:check_branch]
|
33
|
-
other_action.ensure_git_status_clean if params[:check_git_status]
|
34
|
-
end
|
35
|
-
|
36
|
-
def self.ensure_release_tag_is_new(version_number)
|
37
|
-
if other_action.git_tag_exists(tag: version_number)
|
38
|
-
UI.user_error!("Tag for version #{version_number} already exists!")
|
39
|
-
else
|
40
|
-
UI.success("Ignore the red warning above. Tag for version #{version_number} is alright!")
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
#####################################################
|
45
|
-
# @!group Documentation
|
46
|
-
#####################################################
|
47
|
-
|
48
|
-
def self.description
|
49
|
-
'Publishes iOS SDKs to GitHub and CocoaPods'
|
50
|
-
end
|
51
|
-
|
52
|
-
def self.available_options
|
53
|
-
[
|
54
|
-
FastlaneCore::ConfigItem.new(
|
55
|
-
key: :version,
|
56
|
-
description: 'Release version',
|
57
|
-
optional: true
|
58
|
-
),
|
59
|
-
FastlaneCore::ConfigItem.new(
|
60
|
-
key: :sdk_names,
|
61
|
-
description: 'SDK names to release',
|
62
|
-
is_string: false,
|
63
|
-
verify_block: proc do |sdks|
|
64
|
-
UI.user_error!("SDK names array has to be specified") unless sdks.kind_of?(Array) && sdks.size.positive?
|
65
|
-
end
|
66
|
-
),
|
67
|
-
FastlaneCore::ConfigItem.new(
|
68
|
-
env_name: 'GITHUB_REPOSITORY',
|
69
|
-
key: :github_repo,
|
70
|
-
description: 'Github repository name'
|
71
|
-
),
|
72
|
-
FastlaneCore::ConfigItem.new(
|
73
|
-
env_name: 'GITHUB_TOKEN',
|
74
|
-
key: :github_token,
|
75
|
-
description: 'GITHUB_TOKEN environment variable'
|
76
|
-
),
|
77
|
-
FastlaneCore::ConfigItem.new(
|
78
|
-
key: :check_git_status,
|
79
|
-
description: 'Ensure git status is clean',
|
80
|
-
is_string: false,
|
81
|
-
default_value: true
|
82
|
-
),
|
83
|
-
FastlaneCore::ConfigItem.new(
|
84
|
-
key: :check_branch,
|
85
|
-
description: 'Ensure git branch is main',
|
86
|
-
is_string: false,
|
87
|
-
default_value: true
|
88
|
-
),
|
89
|
-
FastlaneCore::ConfigItem.new(
|
90
|
-
key: :pod_sync,
|
91
|
-
description: 'If validation depends on other recently pushed pods, synchronize',
|
92
|
-
is_string: false,
|
93
|
-
default_value: false
|
94
|
-
),
|
95
|
-
FastlaneCore::ConfigItem.new(
|
96
|
-
key: :changelog_path,
|
97
|
-
env_name: 'FL_CHANGELOG_PATH',
|
98
|
-
description: 'The path to your project CHANGELOG.md',
|
99
|
-
is_string: true,
|
100
|
-
default_value: './CHANGELOG.md'
|
101
|
-
)
|
102
|
-
]
|
103
|
-
end
|
104
|
-
|
105
|
-
def self.supported?(_platform)
|
106
|
-
[:ios].include?(platform)
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|