fastlane-plugin-stream_actions 0.2.7 → 0.3.0
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: 538676956ed7da6188700b401319fcfeb1622a3dc9ac417c280295bb3f8dbfed
|
4
|
+
data.tar.gz: be200c10967bcd1c86a27bdda06a4c539c4f46da9d5b7d0eb3799c2194a080f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3b4bd225135e80025715aa44c44ab6e718dde065028186c17622fb658e322e30086f627c28d0fbec47a0b9ec598f2e4139d699c45d33e706dd1af7be4b86833
|
7
|
+
data.tar.gz: 529c332761b3c6defb5d56323d968e77e889a84833164dcb93bab9b7cbb089fd5d01aa71cfe9eedc6a17264169398dc89281c280691aef6c653c62f272d412d1
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
|
-
class
|
3
|
+
class IosSdkReleaseAction < Action
|
4
4
|
def self.run(params)
|
5
5
|
ensure_everything_is_set_up(params)
|
6
6
|
|
@@ -29,26 +29,39 @@ module Fastlane
|
|
29
29
|
other_action.version_bump_podspec(path: podspec, version_number: version_number)
|
30
30
|
end
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
release_details = other_action.set_github_release(
|
35
|
-
repository_name: params[:github_repo],
|
36
|
-
api_token: params[:github_token],
|
37
|
-
name: version_number,
|
38
|
-
tag_name: version_number,
|
39
|
-
description: changes,
|
40
|
-
commitish: ENV['BRANCH_NAME'] || other_action.git_branch
|
41
|
-
)
|
32
|
+
sh("git checkout -b release/#{version_number}") if params[:create_pull_request]
|
42
33
|
|
43
|
-
|
34
|
+
commit_changes(version_number)
|
44
35
|
|
45
|
-
|
36
|
+
if params[:create_pull_request]
|
37
|
+
create_pull_request(
|
38
|
+
api_token: params[:github_token],
|
39
|
+
repo: params[:github_repo],
|
40
|
+
title: "#{version_number} Release",
|
41
|
+
head: "release/#{version_number}",
|
42
|
+
base: 'main',
|
43
|
+
body: changes.to_s
|
44
|
+
)
|
45
|
+
UI.success("Successfully started release #{version_number}! 🚢")
|
46
|
+
else
|
47
|
+
other_action.publish_ios_sdk_release(
|
48
|
+
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
|
+
changelog_path: params[:changelog_path]
|
55
|
+
)
|
56
|
+
end
|
46
57
|
end
|
47
58
|
|
48
59
|
def self.ensure_everything_is_set_up(params)
|
49
|
-
other_action.ensure_git_branch(branch: '
|
60
|
+
other_action.ensure_git_branch(branch: 'develop') if params[:check_branch]
|
50
61
|
other_action.ensure_git_status_clean if params[:check_git_status]
|
51
62
|
|
63
|
+
UI.user_error!('Please set GITHUB_TOKEN environment value.') if ENV['GITHUB_TOKEN'].nil?
|
64
|
+
|
52
65
|
if params[:version].nil? && !["patch", "minor", "major"].include?(params[:bump_type])
|
53
66
|
UI.user_error!("Please use type parameter with one of the options: type:patch, type:minor, type:major")
|
54
67
|
end
|
@@ -69,7 +82,7 @@ module Fastlane
|
|
69
82
|
sh("git commit -m 'Bump #{version_number}'")
|
70
83
|
UI.user_error!("Not pushing changes") unless other_action.prompt(text: "Will push changes. All looking good?", boolean: true)
|
71
84
|
|
72
|
-
other_action.push_to_git_remote(tags:
|
85
|
+
other_action.push_to_git_remote(tags: false)
|
73
86
|
end
|
74
87
|
|
75
88
|
#####################################################
|
@@ -77,7 +90,7 @@ module Fastlane
|
|
77
90
|
#####################################################
|
78
91
|
|
79
92
|
def self.description
|
80
|
-
'Releases iOS SDKs
|
93
|
+
'Releases iOS SDKs'
|
81
94
|
end
|
82
95
|
|
83
96
|
def self.available_options
|
@@ -117,23 +130,23 @@ module Fastlane
|
|
117
130
|
default_value: true
|
118
131
|
),
|
119
132
|
FastlaneCore::ConfigItem.new(
|
120
|
-
key: :
|
121
|
-
description: 'Ensure git branch is
|
133
|
+
key: :check_branch,
|
134
|
+
description: 'Ensure git branch is develop',
|
122
135
|
is_string: false,
|
123
136
|
default_value: true
|
124
137
|
),
|
125
|
-
FastlaneCore::ConfigItem.new(
|
126
|
-
key: :pod_sync,
|
127
|
-
description: 'If validation depends on other recently pushed pods, synchronize',
|
128
|
-
is_string: false,
|
129
|
-
default_value: false
|
130
|
-
),
|
131
138
|
FastlaneCore::ConfigItem.new(
|
132
139
|
key: :changelog_path,
|
133
140
|
env_name: 'FL_CHANGELOG_PATH',
|
134
141
|
description: 'The path to your project CHANGELOG.md',
|
135
142
|
is_string: true,
|
136
143
|
default_value: './CHANGELOG.md'
|
144
|
+
),
|
145
|
+
FastlaneCore::ConfigItem.new(
|
146
|
+
key: :create_pull_request,
|
147
|
+
description: 'Create pull request? Otherwise, will release straight away',
|
148
|
+
is_string: false,
|
149
|
+
default_value: true
|
137
150
|
)
|
138
151
|
]
|
139
152
|
end
|
@@ -0,0 +1,110 @@
|
|
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
|
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.
|
4
|
+
version: 0.3.0
|
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-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -233,11 +233,12 @@ 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
|
236
237
|
- lib/fastlane/plugin/stream_actions/actions/is_check_required.rb
|
237
238
|
- lib/fastlane/plugin/stream_actions/actions/pod_push_safely.rb
|
238
239
|
- lib/fastlane/plugin/stream_actions/actions/prepare_simulator.rb
|
240
|
+
- lib/fastlane/plugin/stream_actions/actions/publish_ios_sdk_release.rb
|
239
241
|
- lib/fastlane/plugin/stream_actions/actions/read_changelog.rb
|
240
|
-
- lib/fastlane/plugin/stream_actions/actions/release_ios_sdk.rb
|
241
242
|
- lib/fastlane/plugin/stream_actions/actions/retrieve_xctest_names.rb
|
242
243
|
- lib/fastlane/plugin/stream_actions/actions/testflight_build.rb
|
243
244
|
- lib/fastlane/plugin/stream_actions/actions/touch_changelog.rb
|