fastlane-plugin-stream_actions 0.3.59 → 0.3.61
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/merge_main_to_develop.rb +32 -0
- data/lib/fastlane/plugin/stream_actions/actions/merge_release_to_main.rb +66 -0
- data/lib/fastlane/plugin/stream_actions/actions/pr_create.rb +2 -2
- data/lib/fastlane/plugin/stream_actions/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eb47d690f49f99e9e5eb33059cd52a83fea990ac32d4a74a55ddbadfc672a4d
|
4
|
+
data.tar.gz: f72186ee2ab89ed705e73f182405dc8e6e5a26064edf9d7d54b3a198c36b69b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c9482510bea5efc9420998044682d5b82102d2f70d0b42f0d941d68af496e98c4d64b347d3ccadba363cfe239f2a8714a81d2045fbb1a23df5f6c435f153e98
|
7
|
+
data.tar.gz: 2fb17159311e1c45e1c1f147546fc274fc8cc3951bae8ba5618883e0e30da872b722ec141eebe8ca4e3bdf4ff8f560971c6a0feb5d74d7f13383078f49b1612f
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class MergeMainToDevelopAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
other_action.ensure_git_status_clean
|
6
|
+
sh('git checkout main')
|
7
|
+
sh('git pull origin main')
|
8
|
+
sh('git checkout origin/develop')
|
9
|
+
sh('git pull origin develop')
|
10
|
+
sh('git log develop..main')
|
11
|
+
sh('git merge main')
|
12
|
+
sh('git push origin develop')
|
13
|
+
end
|
14
|
+
|
15
|
+
#####################################################
|
16
|
+
# @!group Documentation
|
17
|
+
#####################################################
|
18
|
+
|
19
|
+
def self.description
|
20
|
+
'Merge main branch to develop'
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.available_options
|
24
|
+
[]
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.is_supported?(platform)
|
28
|
+
true
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class MergeReleaseToMainAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
other_action.ensure_git_status_clean
|
6
|
+
|
7
|
+
release_branch =
|
8
|
+
if is_ci
|
9
|
+
# This API operation needs the "admin:org" scope.
|
10
|
+
ios_team = `gh api orgs/GetStream/teams/#{params[:github_team_name]}/members -q '.[].login'`.split("\n")
|
11
|
+
UI.user_error!("#{params[:author]} is not a member of the iOS Team") unless ios_team.include?(params[:author])
|
12
|
+
|
13
|
+
other_action.current_branch
|
14
|
+
else
|
15
|
+
release_branches = sh(command: 'git branch -a').delete(' ').split("\n").grep(%r(origin/.*release/))
|
16
|
+
UI.user_error!("Expected 1 release branch, found #{release_branches.size}") if release_branches.size != 1
|
17
|
+
|
18
|
+
release_branches.first
|
19
|
+
end
|
20
|
+
|
21
|
+
UI.user_error!("`#{release_branch}`` branch does not match the release branch pattern: `release/*`") unless release_branch.start_with?('release/')
|
22
|
+
|
23
|
+
sh('git config pull.ff only')
|
24
|
+
sh('git fetch --all --tags --prune')
|
25
|
+
sh("git checkout #{release_branch}")
|
26
|
+
sh("git pull origin #{release_branch} --ff-only")
|
27
|
+
sh('git checkout main')
|
28
|
+
sh('git pull origin main --ff-only')
|
29
|
+
sh("git merge #{release_branch} --ff-only")
|
30
|
+
sh('git push origin main')
|
31
|
+
|
32
|
+
comment = "Publication of the release has been launched 👍"
|
33
|
+
UI.important(comment)
|
34
|
+
other_action.pr_comment(text: comment)
|
35
|
+
end
|
36
|
+
|
37
|
+
#####################################################
|
38
|
+
# @!group Documentation
|
39
|
+
#####################################################
|
40
|
+
|
41
|
+
def self.description
|
42
|
+
'Merge release branch to main'
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.available_options
|
46
|
+
[
|
47
|
+
FastlaneCore::ConfigItem.new(
|
48
|
+
env_name: 'USER_LOGIN',
|
49
|
+
key: :author,
|
50
|
+
description: 'Github user name',
|
51
|
+
optional: true
|
52
|
+
),
|
53
|
+
FastlaneCore::ConfigItem.new(
|
54
|
+
key: :github_team_name,
|
55
|
+
description: 'Github team name',
|
56
|
+
default_value: 'ios-developers'
|
57
|
+
)
|
58
|
+
]
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.is_supported?(platform)
|
62
|
+
true
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -2,7 +2,6 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class PrCreateAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
params[:base_branch] ||= 'develop'
|
6
5
|
sh("git checkout -b #{params[:head_branch]}")
|
7
6
|
sh('git restore Brewfile.lock.json || true')
|
8
7
|
sh('git add -A')
|
@@ -40,7 +39,8 @@ module Fastlane
|
|
40
39
|
FastlaneCore::ConfigItem.new(
|
41
40
|
key: :base_branch,
|
42
41
|
description: 'Base branch',
|
43
|
-
is_string: true
|
42
|
+
is_string: true,
|
43
|
+
default_value: 'develop'
|
44
44
|
),
|
45
45
|
FastlaneCore::ConfigItem.new(
|
46
46
|
key: :head_branch,
|
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.61
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GetStream
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xctest_list
|
@@ -238,6 +238,8 @@ files:
|
|
238
238
|
- lib/fastlane/plugin/stream_actions/actions/git_status.rb
|
239
239
|
- lib/fastlane/plugin/stream_actions/actions/install_ios_runtime.rb
|
240
240
|
- lib/fastlane/plugin/stream_actions/actions/is_check_required.rb
|
241
|
+
- lib/fastlane/plugin/stream_actions/actions/merge_main_to_develop.rb
|
242
|
+
- lib/fastlane/plugin/stream_actions/actions/merge_release_to_main.rb
|
241
243
|
- lib/fastlane/plugin/stream_actions/actions/pod_push_safely.rb
|
242
244
|
- lib/fastlane/plugin/stream_actions/actions/pr_comment.rb
|
243
245
|
- lib/fastlane/plugin/stream_actions/actions/pr_create.rb
|