fastlane-plugin-gs_project_flow_ios 0.2.16 → 0.3.0
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/gs_project_flow_ios/actions/gs_after_all_action.rb +82 -0
- data/lib/fastlane/plugin/gs_project_flow_ios/actions/gs_error_action.rb +46 -0
- data/lib/fastlane/plugin/gs_project_flow_ios/actions/gs_execute_beta_lane.rb +9 -9
- data/lib/fastlane/plugin/gs_project_flow_ios/actions/gs_execute_external_runner_lane.rb +45 -0
- data/lib/fastlane/plugin/gs_project_flow_ios/actions/gs_execute_rc_lane.rb +166 -0
- data/lib/fastlane/plugin/gs_project_flow_ios/actions/gs_execute_release_lane.rb +142 -0
- data/lib/fastlane/plugin/gs_project_flow_ios/helper/gs_project_flow_ios_helper.rb +70 -0
- data/lib/fastlane/plugin/gs_project_flow_ios/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b4419a926b588dc6229686c71f696f229421724
|
4
|
+
data.tar.gz: 2fd3e1e5a46c74b2f1c72cdc18dca7f621c030c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7cb036dedea46ea92df89a30b9e511ba62c93819ba244f60bbd4c50cabc86eea34348e8eca7f6985ca438430106ad1acd5726f4498adb68dc8e6f829ce2418f
|
7
|
+
data.tar.gz: b29122a76ee3ffaa051c52addca79152acef35fc7ae6be305bb26d06df0178934246cf8c978a1cba996d75d2049dae6c1b0ca45926d400384f8b896308532726
|
@@ -0,0 +1,82 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class GsBeforeAllAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
action = 'cocoapods'
|
6
|
+
parameters = {:use_bundle_exec => false}
|
7
|
+
|
8
|
+
Fastlane::Helper::GsProjectFlowIosHelper.new.execute_action(action,parameters)
|
9
|
+
|
10
|
+
|
11
|
+
version_name, v = Helper::GsProjectFlowIosHelper.version_for_lane(param[:lane])
|
12
|
+
message = ENV["PROJECT_NAME"] + " " + version_name + "<pre> build successful.</pre>"
|
13
|
+
Helper::GsProjectFlowIosHelper.send_report(message,Helper::GsProjectFlowIosHelper::BuildState::SUCCESS,param[:lane])
|
14
|
+
cmd = ""
|
15
|
+
options = {}
|
16
|
+
if param[:lane] == :beta
|
17
|
+
cmd = "beta"
|
18
|
+
options = {cmd:cmd,
|
19
|
+
displayVersionName:version_name,
|
20
|
+
request: "cmd",
|
21
|
+
alias: ENV["ALIAS"]
|
22
|
+
}
|
23
|
+
elsif param[:lane] == :rc
|
24
|
+
cmd = "mv2rc"
|
25
|
+
options = {
|
26
|
+
cmd:cmd,
|
27
|
+
displayVersionName:version_name,
|
28
|
+
build_number:v.build,
|
29
|
+
request: "cmd",
|
30
|
+
alias: ENV["ALIAS"]
|
31
|
+
}
|
32
|
+
elsif param[:lane] == :release
|
33
|
+
cmd = "rc2release"
|
34
|
+
options = {cmd:cmd,
|
35
|
+
displayVersionName:version_name,
|
36
|
+
build_number:v.build,
|
37
|
+
request: "cmd",
|
38
|
+
alias: ENV["ALIAS"]
|
39
|
+
}
|
40
|
+
|
41
|
+
end
|
42
|
+
if cmd != ""
|
43
|
+
Actions::GsExecuteCommandAction.run(FastlaneCore::Configuration.create(GsStartExternalTestingAction.available_options,options))
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.description
|
48
|
+
"Plugin contains project flow code for code sharing between projects"
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.authors
|
52
|
+
["Сергей Веселовский"]
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.return_value
|
56
|
+
# If your method provides a return value, you can describe here what it does
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.details
|
60
|
+
# Optional:
|
61
|
+
"Plugin contains project flow code for code sharing between GradoService projects"
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.available_options
|
65
|
+
[
|
66
|
+
FastlaneCore::ConfigItem.new(key: :lane,
|
67
|
+
description: "A description of your option",
|
68
|
+
optional: false,
|
69
|
+
type: Symbol)
|
70
|
+
]
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.is_supported?(platform)
|
74
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
75
|
+
# See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
|
76
|
+
#
|
77
|
+
# [:ios, :mac, :android].include?(platform)
|
78
|
+
true
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class GsErrorAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
version_name, v = Helper::GsProjectFlowIosHelper.version_for_lane(lane)
|
6
|
+
# ENV["PROJECT_NAME"] - переменка окружения, используемая в iOS, как читаемое название проекта + ключ в json файлике версий
|
7
|
+
message = ENV["PROJECT_NAME"] + " " + version_name + " build has failed. Reason:\n <code>" + exception.message + "</code>"
|
8
|
+
Helper::GsProjectFlowIosHelper.send_report(message,Helper::GsProjectFlowIosHelper::BuildState::FAILURE, params[:lane])
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.description
|
12
|
+
"Plugin contains project flow code for code sharing between projects"
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.authors
|
16
|
+
["Сергей Веселовский"]
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.return_value
|
20
|
+
# If your method provides a return value, you can describe here what it does
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.details
|
24
|
+
# Optional:
|
25
|
+
"Plugin contains project flow code for code sharing between GradoService projects"
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.available_options
|
29
|
+
[
|
30
|
+
FastlaneCore::ConfigItem.new(key: :lane,
|
31
|
+
description: "A description of your option",
|
32
|
+
optional: false,
|
33
|
+
type: Symbol)
|
34
|
+
]
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.is_supported?(platform)
|
38
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
39
|
+
# See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
|
40
|
+
#
|
41
|
+
# [:ios, :mac, :android].include?(platform)
|
42
|
+
true
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -37,15 +37,15 @@ module Fastlane
|
|
37
37
|
sh Dir.pwd+"/DeleteDerrivedData.sh"
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
40
|
+
Actions::GymAction.run(FastlaneCore::Configuration.create(GymAction.available_options,{scheme: ENV["APP_SCHEME"],
|
41
|
+
export_method:"ad-hoc"})) # Build your app - more options available
|
42
|
+
|
43
|
+
Actions::CrashlyticsAction.run(FastlaneCore::Configuration.create(GymAction.available_options,{notes: crashlytics_changelog,
|
44
|
+
groups: ENV["CRASHLYTICS_GROUPS"]}))
|
45
|
+
|
46
|
+
|
47
|
+
Actions::GsSaveBetaVersionAction.run(FastlaneCore::Configuration.create(GsSaveBetaVersionAction.available_options,{path:Helper::GsProjectFlowIosHelper.get_versions_path}))
|
48
|
+
UI.success("✅ App is released to Crashlytics")
|
49
49
|
# # You can also use other beta testing services here (run fastlane actions)
|
50
50
|
end
|
51
51
|
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class GsExecuteExternalRunnerLaneAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require 'fastlane/plugin/gs_deliver'
|
6
|
+
Actions::GsStartExternalTestingAction.run(FastlaneCore::Configuration.create(GsStartExternalTestingAction.available_options,{app_identifier:ENV["BUNDLE_ID"]}))
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.description
|
10
|
+
"Plugin contains project flow code for code sharing between projects"
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.authors
|
14
|
+
["Сергей Веселовский"]
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.return_value
|
18
|
+
# If your method provides a return value, you can describe here what it does
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.details
|
22
|
+
# Optional:
|
23
|
+
"Plugin contains project flow code for code sharing between GradoService projects"
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.available_options
|
27
|
+
[
|
28
|
+
# FastlaneCore::ConfigItem.new(key: :your_option,
|
29
|
+
# env_name: "GS_PROJECT_FLOW_IOS_YOUR_OPTION",
|
30
|
+
# description: "A description of your option",
|
31
|
+
# optional: false,
|
32
|
+
# type: String)
|
33
|
+
]
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.is_supported?(platform)
|
37
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
38
|
+
# See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
|
39
|
+
#
|
40
|
+
# [:ios, :mac, :android].include?(platform)
|
41
|
+
true
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,166 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class GsExecuteRcLaneAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require 'fastlane/plugin/gs_versioning'
|
6
|
+
require 'fastlane/plugin/versioning'
|
7
|
+
|
8
|
+
fastlaneHelper = Fastlane::Helper::GsProjectFlowIosHelper.new
|
9
|
+
arg = FastlaneCore::Configuration.create(GsIncrementRcVersionAction.available_options, {path:Helper::GsProjectFlowIosHelper.get_versions_path})
|
10
|
+
v = GsIncrementRcVersionAction.run(arg)
|
11
|
+
version_name = v.major.to_s + "." + v.minor.to_s + "." + v.build.to_s
|
12
|
+
UI.message('version' + version_name)
|
13
|
+
|
14
|
+
Actions::SetInfoPlistValueAction.run(FastlaneCore::Configuration.create(SetInfoPlistValueAction.available_options,{path: plist_path, key: "ITSAppUsesNonExemptEncryption", value: "false"}))
|
15
|
+
|
16
|
+
Actions::IncrementBuildNumberInPlistAction.run(FastlaneCore::Configuration.create(Actions::IncrementBuildNumberInPlistAction.available_options,
|
17
|
+
{xcodeproj:ENV["xcodeproj"], target:ENV["target"], build_number: v.build.to_s}))
|
18
|
+
|
19
|
+
Actions::IncrementVersionNumberInPlistAction.run(FastlaneCore::Configuration.create(Actions::IncrementVersionNumberInPlistAction.available_options,
|
20
|
+
{version_number: v.major.to_s + "." + v.minor.to_s + ".0", xcodeproj: ENV["xcodeproj"], target: ENV["target"]}))
|
21
|
+
|
22
|
+
ruText = fastlaneHelper.generateReleaseNotes("fileClosed", params[:alias], version_name, "Ru")
|
23
|
+
enText = fastlaneHelper.generateReleaseNotes("fileClosed", params[:alias], version_name, "En")
|
24
|
+
|
25
|
+
# ruText = FileHelper.read(Dir.pwd + "/../../../notes/" + ENV["ALIAS"] + "/" + version_name + "_Ru.txt")
|
26
|
+
# enText = FileHelper.read(Dir.pwd + "/../../../notes/" + ENV["ALIAS"] + "/" + version_name + "_En.txt")
|
27
|
+
testflight_changelog = ruText + "\n\n" + enText
|
28
|
+
UI.message("changelog = " + testflight_changelog)
|
29
|
+
|
30
|
+
appDescription = Helper::FileHelper.read (Dir.pwd + "/metadata/ru/description.txt")
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
options = {changelog: testflight_changelog,
|
35
|
+
beta_app_description:appDescription,
|
36
|
+
distribute_external: false,
|
37
|
+
beta_app_feedback_email: "cimobdaemon@gmail.com"}
|
38
|
+
|
39
|
+
Dir.chdir ".." do
|
40
|
+
sh "chmod 744 ./DeleteDerrivedData.sh"
|
41
|
+
sh Dir.pwd+"/DeleteDerrivedData.sh"
|
42
|
+
end
|
43
|
+
Actions::GymAction.run(FastlaneCore::Configuration.create(GymAction.available_options,{scheme: ENV["APP_SCHEME"],
|
44
|
+
export_method:"app-store"})) # Build your app - more options available
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
s = Actions::GsGetAppStatusAction.run(FastlaneCore::Configuration.create(GsGetAppStatusAction.available_options,{app_identifier:ENV["BUNDLE_ID"]}))
|
50
|
+
if s == "Pending Developer Release"
|
51
|
+
Actions::GsRejectLatestVersionAction.run(FastlaneCore::Configuration.create(GsRejectLatestVersionAction.available_options,{app_identifier:ENV["BUNDLE_ID"]}))
|
52
|
+
end
|
53
|
+
|
54
|
+
Actions::PilotAction.run(FastlaneCore::Configuration.create(GsRejectLatestVersionAction.available_options,options))
|
55
|
+
UI.success("App is released to internal testing")
|
56
|
+
|
57
|
+
Actions::GsSaveRcVersionAction.run(FastlaneCore::Configuration.create(GsSaveRcVersionAction.available_options,{path:Helper::GsProjectFlowIosHelper.get_versions_path}))
|
58
|
+
|
59
|
+
Actions::GsExecuteRcLaneAction.moveToReview(version_name)
|
60
|
+
UI.success("✅ App status is changed to Waiting For Review")
|
61
|
+
options[:distribute_external] = true
|
62
|
+
options[:review_contact_info] = {
|
63
|
+
review_first_name: "MyTestAccount",
|
64
|
+
review_last_name: "MyTestAccount",
|
65
|
+
review_phone_number: "88432000555",
|
66
|
+
review_contact_email: "cimobdaemon@gmail.com",
|
67
|
+
}
|
68
|
+
begin
|
69
|
+
Actions::GsMoveRcToBetaReviewAction.run(FastlaneCore::Configuration.create(GsMoveRcToBetaReviewAction.available_options,
|
70
|
+
options))
|
71
|
+
UI.success("App is moved to beta review for external testing")
|
72
|
+
rescue Exception => e
|
73
|
+
UI.important(e.message)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
def self.moveToReview(version)
|
79
|
+
s = Actions::GsGetAppStatusAction.run(FastlaneCore::Configuration.create(GsGetAppStatusAction.available_options,{app_identifier:ENV["BUNDLE_ID"]}))
|
80
|
+
arg = FastlaneCore::Configuration.create(GsIncrementReleaseVersionAction.available_options, {path:Helper::GsProjectFlowIosHelper.get_versions_path})
|
81
|
+
v = GsIncrementReleaseVersionAction.run(arg)
|
82
|
+
# match(type: "appstore")
|
83
|
+
# snapshot
|
84
|
+
version_name = v.major.to_s + "." + v.minor.to_s
|
85
|
+
|
86
|
+
# generateReleaseNotes("fileClosed", ENV["ALIAS"], version_name, "Ru")
|
87
|
+
# generateReleaseNotes("fileClosed", ENV["ALIAS"], version_name, "En")
|
88
|
+
|
89
|
+
ruText = Helper::FileHelper.read(Dir.pwd + "/../../../notes/" + ENV["ALIAS"] + "/" + version_name + "_Ru.txt")
|
90
|
+
enText = Helper::FileHelper.read(Dir.pwd + "/../../../notes/" + ENV["ALIAS"] + "/" + version_name + "_En.txt")
|
91
|
+
Helper::FileHelper.write(Dir.pwd+'/metadata/ru/release_notes.txt', ruText)
|
92
|
+
Helper::FileHelper.write(Dir.pwd+'/metadata/en-US/release_notes.txt', enText)
|
93
|
+
# gym(scheme: ENV["APP_SCHEME"]) # Build your app - more options available
|
94
|
+
if s == "Waiting For Review" || s == "Pending Developer Release"
|
95
|
+
Actions::GsRejectLatestVersionAction.run(FastlaneCore::Configuration.create(GsRejectLatestVersionAction.available_options,{app_identifier:ENV["BUNDLE_ID"]}))
|
96
|
+
end
|
97
|
+
Actions::DeliverAction.run(FastlaneCore::Configuration.create(DeliverAction.available_options,{force:true,
|
98
|
+
submit_for_review: true,
|
99
|
+
app_version: version,
|
100
|
+
skip_binary_upload:true,
|
101
|
+
automatic_release:false,
|
102
|
+
submission_information: {
|
103
|
+
add_id_info_limits_tracking: false,
|
104
|
+
add_id_info_serves_ads: false,
|
105
|
+
add_id_info_tracks_action: false,
|
106
|
+
add_id_info_tracks_install: false,
|
107
|
+
add_id_info_uses_idfa: false,
|
108
|
+
content_rights_has_rights: true,
|
109
|
+
content_rights_contains_third_party_content: false,
|
110
|
+
export_compliance_platform: 'ios',
|
111
|
+
export_compliance_compliance_required: false,
|
112
|
+
export_compliance_encryption_updated: false,
|
113
|
+
export_compliance_app_type: nil,
|
114
|
+
export_compliance_uses_encryption: false,
|
115
|
+
export_compliance_is_exempt: false,
|
116
|
+
export_compliance_contains_third_party_cryptography: false,
|
117
|
+
export_compliance_contains_proprietary_cryptography: false,
|
118
|
+
export_compliance_available_on_french_store: false
|
119
|
+
}}))
|
120
|
+
end
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
def self.description
|
131
|
+
"Plugin contains project flow code for code sharing between projects"
|
132
|
+
end
|
133
|
+
|
134
|
+
def self.authors
|
135
|
+
["Сергей Веселовский"]
|
136
|
+
end
|
137
|
+
|
138
|
+
def self.return_value
|
139
|
+
# If your method provides a return value, you can describe here what it does
|
140
|
+
end
|
141
|
+
|
142
|
+
def self.details
|
143
|
+
# Optional:
|
144
|
+
"Plugin contains project flow code for code sharing between GradoService projects"
|
145
|
+
end
|
146
|
+
|
147
|
+
def self.available_options
|
148
|
+
[
|
149
|
+
FastlaneCore::ConfigItem.new(key: :alias,
|
150
|
+
env_name: "ALIAS",
|
151
|
+
description: "project system alias",
|
152
|
+
optional: false,
|
153
|
+
type: String)
|
154
|
+
]
|
155
|
+
end
|
156
|
+
|
157
|
+
def self.is_supported?(platform)
|
158
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
159
|
+
# See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
|
160
|
+
#
|
161
|
+
# [:ios, :mac, :android].include?(platform)
|
162
|
+
true
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class GsExecuteReleaseLaneAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require 'fastlane/plugin/gs_versioning'
|
6
|
+
require 'fastlane/plugin/versioning'
|
7
|
+
require 'fastlane/plugin/gs_deliver'
|
8
|
+
|
9
|
+
s = Actions::GsGetAppStatusAction.run(FastlaneCore::Configuration.create(GsGetAppStatusAction.available_options,{app_identifier:ENV["BUNDLE_ID"]}))
|
10
|
+
UI.success("App Status = " + s)
|
11
|
+
|
12
|
+
arg = FastlaneCore::Configuration.create(GsIncrementReleaseVersionAction.available_options, {path:Helper::GsProjectFlowIosHelper.get_versions_path})
|
13
|
+
v = GsIncrementReleaseVersionAction.run(arg)
|
14
|
+
version_name = v.major.to_s + "." + v.minor.to_s
|
15
|
+
ruText = Helper::GsProjectFlowIosHelper.new.generateReleaseNotes("fileClosed", ENV["ALIAS"], version_name, "Ru")
|
16
|
+
enText = Helper::GsProjectFlowIosHelper.new.generateReleaseNotes("fileClosed", ENV["ALIAS"], version_name, "En")
|
17
|
+
generateReleaseNotes("fileClosed", ENV["ALIAS"], version_name, "En")
|
18
|
+
|
19
|
+
Helper::FileHelper.write(Dir.pwd+'/metadata/ru/release_notes.txt', ruText)
|
20
|
+
Helper::FileHelper.write(Dir.pwd+'/metadata/en-US/release_notes.txt', enText)
|
21
|
+
|
22
|
+
if s == "Waiting For Review"
|
23
|
+
Actions::DeliverAction.run(FastlaneCore::Configuration.create(DeliverAction.available_options,{
|
24
|
+
force:true,
|
25
|
+
app_version: version_name,
|
26
|
+
skip_binary_upload:true,
|
27
|
+
skip_screenshots: true,
|
28
|
+
#skip_metadata: true,
|
29
|
+
automatic_release:true,
|
30
|
+
submission_information: {
|
31
|
+
add_id_info_limits_tracking: false,
|
32
|
+
add_id_info_serves_ads: false,
|
33
|
+
add_id_info_tracks_action: false,
|
34
|
+
add_id_info_tracks_install: false,
|
35
|
+
add_id_info_uses_idfa: false,
|
36
|
+
content_rights_has_rights: true,
|
37
|
+
content_rights_contains_third_party_content: false,
|
38
|
+
export_compliance_platform: 'ios',
|
39
|
+
export_compliance_compliance_required: false,
|
40
|
+
export_compliance_encryption_updated: false,
|
41
|
+
export_compliance_app_type: nil,
|
42
|
+
export_compliance_uses_encryption: false,
|
43
|
+
export_compliance_is_exempt: false,
|
44
|
+
export_compliance_contains_third_party_cryptography: false,
|
45
|
+
export_compliance_contains_proprietary_cryptography: false,
|
46
|
+
export_compliance_available_on_french_store: false
|
47
|
+
}}))
|
48
|
+
UI.success("✅ Automatic release is set. App will be released in store after AppReview")
|
49
|
+
elsif s == "Pending Developer Release"
|
50
|
+
Actions::GsMoveToReadyForSaleAction.run(FastlaneCore::Configuration.create(GsMoveToReadyForSaleAction.available_options,{app_identifier:ENV["BUNDLE_ID"]}))
|
51
|
+
UI.success("✅ App is released to store")
|
52
|
+
else
|
53
|
+
raise "App has got unexpected status. Expected statuses: waitingForReview or PendingDeveloperRelease. Current status: "+s
|
54
|
+
end
|
55
|
+
Actions::GsSaveReleaseVersionAction.run(FastlaneCore::Configuration.create(GsSaveReleaseVersionAction.available_options,{path:Helper::GsProjectFlowIosHelper.get_versions_path}))
|
56
|
+
|
57
|
+
|
58
|
+
# s = gs_get_app_status(app_identifier:ENV["BUNDLE_ID"])
|
59
|
+
# UI.success("App Status = " + s)
|
60
|
+
# version_name = v.major.to_s + "." + v.minor.to_s
|
61
|
+
|
62
|
+
# generateReleaseNotes("fileClosed", ENV["ALIAS"], version_name, "Ru")
|
63
|
+
# generateReleaseNotes("fileClosed", ENV["ALIAS"], version_name, "En")
|
64
|
+
# ruText = FileHelper.read(Dir.pwd + "/../../../notes/" + ENV["ALIAS"] + "/" + version_name + "_Ru.txt")
|
65
|
+
# enText = FileHelper.read(Dir.pwd + "/../../../notes/" + ENV["ALIAS"] + "/" + version_name + "_En.txt")
|
66
|
+
# FileHelper.write(Dir.pwd+'/metadata/ru/release_notes.txt', ruText)
|
67
|
+
# FileHelper.write(Dir.pwd+'/metadata/en-US/release_notes.txt', enText)
|
68
|
+
# if s == "Waiting For Review"
|
69
|
+
# deliver(#submit_for_review: true,
|
70
|
+
# force:true,
|
71
|
+
# app_version: version_name,
|
72
|
+
# skip_binary_upload:true,
|
73
|
+
# skip_screenshots: true,
|
74
|
+
# #skip_metadata: true,
|
75
|
+
# automatic_release:true,
|
76
|
+
# submission_information: {
|
77
|
+
# add_id_info_limits_tracking: false,
|
78
|
+
# add_id_info_serves_ads: false,
|
79
|
+
# add_id_info_tracks_action: false,
|
80
|
+
# add_id_info_tracks_install: false,
|
81
|
+
# add_id_info_uses_idfa: false,
|
82
|
+
# content_rights_has_rights: true,
|
83
|
+
# content_rights_contains_third_party_content: false,
|
84
|
+
# export_compliance_platform: 'ios',
|
85
|
+
# export_compliance_compliance_required: false,
|
86
|
+
# export_compliance_encryption_updated: false,
|
87
|
+
# export_compliance_app_type: nil,
|
88
|
+
# export_compliance_uses_encryption: false,
|
89
|
+
# export_compliance_is_exempt: false,
|
90
|
+
# export_compliance_contains_third_party_cryptography: false,
|
91
|
+
# export_compliance_contains_proprietary_cryptography: false,
|
92
|
+
# export_compliance_available_on_french_store: false
|
93
|
+
# })
|
94
|
+
# UI.success("✅ Automatic release is set. App will be released in store after AppReview")
|
95
|
+
# elsif s == "Pending Developer Release"
|
96
|
+
# gs_move_to_ready_for_sale(app_identifier:ENV["BUNDLE_ID"])
|
97
|
+
# UI.success("✅ App is released to store")
|
98
|
+
# else
|
99
|
+
# raise "App has got unexpected status. Expected statuses: waitingForReview or PendingDeveloperRelease. Current status: "+s
|
100
|
+
# return
|
101
|
+
# end
|
102
|
+
# gs_save_release_version(path: ENV["path_to_versions"], version: v)
|
103
|
+
|
104
|
+
end
|
105
|
+
|
106
|
+
def self.description
|
107
|
+
"Plugin contains project flow code for code sharing between projects"
|
108
|
+
end
|
109
|
+
|
110
|
+
def self.authors
|
111
|
+
["Сергей Веселовский"]
|
112
|
+
end
|
113
|
+
|
114
|
+
def self.return_value
|
115
|
+
# If your method provides a return value, you can describe here what it does
|
116
|
+
end
|
117
|
+
|
118
|
+
def self.details
|
119
|
+
# Optional:
|
120
|
+
"Plugin contains project flow code for code sharing between GradoService projects"
|
121
|
+
end
|
122
|
+
|
123
|
+
def self.available_options
|
124
|
+
[
|
125
|
+
FastlaneCore::ConfigItem.new(key: :alias,
|
126
|
+
env_name: "ALIAS",
|
127
|
+
description: "project system alias",
|
128
|
+
optional: false,
|
129
|
+
type: String)
|
130
|
+
]
|
131
|
+
end
|
132
|
+
|
133
|
+
def self.is_supported?(platform)
|
134
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
135
|
+
# See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
|
136
|
+
#
|
137
|
+
# [:ios, :mac, :android].include?(platform)
|
138
|
+
true
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
@@ -1,5 +1,25 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Helper
|
3
|
+
|
4
|
+
class FileHelper
|
5
|
+
def self.read(path)
|
6
|
+
file = File.open(path, "r+")
|
7
|
+
res = file.read
|
8
|
+
file.close
|
9
|
+
res
|
10
|
+
end
|
11
|
+
def self.write(path, str)
|
12
|
+
if not path.include? "."
|
13
|
+
raise "Filepath has incorrect format. You must provide file extension"
|
14
|
+
end
|
15
|
+
require 'fileutils.rb'
|
16
|
+
FileUtils.makedirs(File.dirname(path))
|
17
|
+
file = File.open(path, "w+")
|
18
|
+
file.write(str)
|
19
|
+
file.close
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
3
23
|
class GsProjectFlowIosHelper
|
4
24
|
# class methods that you define here become available in your action
|
5
25
|
# as `Helper::GsProjectFlowIosHelper.your_method`
|
@@ -42,6 +62,56 @@ module Fastlane
|
|
42
62
|
return text
|
43
63
|
end
|
44
64
|
|
65
|
+
def self.version_for_lane(lane)
|
66
|
+
version_name = ""
|
67
|
+
if lane == :beta
|
68
|
+
v = Actions::GsGetBetaVersionAction.run(FastlaneCore::Configuration.create(Actions::GsGetBetaVersionAction.available_options,{path: GsProjectFlowIosHelper.get_versions_path}))
|
69
|
+
version_name = v.major.to_s+ "." + v.minor.to_s + "." + v.build.to_s
|
70
|
+
elsif lane == :rc
|
71
|
+
v = Actions::GsGetRcVersionAction.run(FastlaneCore::Configuration.create(Actions::GsGetRcVersionAction.available_options,{path: GsProjectFlowIosHelper.get_versions_path}))
|
72
|
+
# v = gs_get_rc_version(path: GsProjectFlowIosHelper.get_versions_path)
|
73
|
+
version_name = v.major.to_s+ "." + v.minor.to_s
|
74
|
+
elsif lane == :release
|
75
|
+
v = Actions::GsGetReleaseVersionAction.run(FastlaneCore::Configuration.create(Actions::GsGetReleaseVersionAction.available_options,{path: GsProjectFlowIosHelper.get_versions_path}))
|
76
|
+
# v = gs_get_release_version(path: GsProjectFlowIosHelper.get_versions_path)
|
77
|
+
version_name = v.major.to_s+ "." + v.minor.to_s
|
78
|
+
end
|
79
|
+
return version_name,v
|
80
|
+
end
|
81
|
+
|
82
|
+
module BuildState
|
83
|
+
START = "started"
|
84
|
+
SUCCESS = "successful"
|
85
|
+
FAILURE = "failed"
|
86
|
+
end
|
87
|
+
def self.send_report(message, buildState, lane)
|
88
|
+
Dir.chdir Dir.pwd+"/../../../../" do
|
89
|
+
UI.message(Dir.pwd)
|
90
|
+
params = Hash.new
|
91
|
+
params["state"] = buildState
|
92
|
+
params["alias"] = ENV["ALIAS"]
|
93
|
+
|
94
|
+
if buildState == BuildState::FAILURE
|
95
|
+
params["message"] = message
|
96
|
+
end
|
97
|
+
|
98
|
+
if lane == :beta
|
99
|
+
params["cmd"] = "beta"
|
100
|
+
elsif lane == :rc
|
101
|
+
params["cmd"] = "rc"
|
102
|
+
elsif lane == :release
|
103
|
+
params["cmd"] = "release"
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
paramsJSON = params.to_json
|
109
|
+
require 'json'
|
110
|
+
sh "curl -X POST -H \"Content-Type: application/json\" -d '#{paramsJSON}' http://mobile.geo4.io/bot/releaseBuilder/jobStates"
|
111
|
+
# sh "sh build_reporter.sh " + chat_id.to_s + " " + message
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
45
115
|
def self.show_message
|
46
116
|
UI.message("Hello from the gs_project_flow_ios plugin helper!")
|
47
117
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-gs_project_flow_ios
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Сергей Веселовский
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -100,8 +100,13 @@ executables: []
|
|
100
100
|
extensions: []
|
101
101
|
extra_rdoc_files: []
|
102
102
|
files:
|
103
|
+
- lib/fastlane/plugin/gs_project_flow_ios/actions/gs_after_all_action.rb
|
103
104
|
- lib/fastlane/plugin/gs_project_flow_ios/actions/gs_before_all_action.rb
|
105
|
+
- lib/fastlane/plugin/gs_project_flow_ios/actions/gs_error_action.rb
|
104
106
|
- lib/fastlane/plugin/gs_project_flow_ios/actions/gs_execute_beta_lane.rb
|
107
|
+
- lib/fastlane/plugin/gs_project_flow_ios/actions/gs_execute_external_runner_lane.rb
|
108
|
+
- lib/fastlane/plugin/gs_project_flow_ios/actions/gs_execute_rc_lane.rb
|
109
|
+
- lib/fastlane/plugin/gs_project_flow_ios/actions/gs_execute_release_lane.rb
|
105
110
|
- lib/fastlane/plugin/gs_project_flow_ios/helper/gs_project_flow_ios_helper.rb
|
106
111
|
- lib/fastlane/plugin/gs_project_flow_ios/version.rb
|
107
112
|
- lib/fastlane/plugin/gs_project_flow_ios.rb
|