fastlane-plugin-taiwan_number_one 0.2.1 → 0.2.6
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: 30a7efee5d2102888aacc0c475d952729991da41eae2010bcdbcb289e56392ce
|
4
|
+
data.tar.gz: '0976e6fcddb1bf2bc35ed104324debc8a8e04718cbbd5347f30d2512b7e0b624'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ec00137f9b533afe8fcc910d7eb4109ba387a651c1413e457b132de0f61563afd63caf6a6693b1c67ce2c83c91c1b23735cc608ae16cf3c3ca756028b440f10
|
7
|
+
data.tar.gz: f933489a34359b0374d0b63740888a4e0e1565410502c7c90d6f261149ac007dbe984fd9a6a10375774244fb942adecd1c2b9042d465bb9535fc5ec7b47cb8ea
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ fastlane add_plugin taiwan_number_one
|
|
12
12
|
|
13
13
|
## About taiwan_number_one
|
14
14
|
|
15
|
-
To approve or reject if status is Pending Developer Release.
|
15
|
+
To approve or reject if status is `Pending Developer Release`, otherwise do nothing.
|
16
16
|
|
17
17
|
#### This feature is requsted for a while:
|
18
18
|
|
@@ -33,10 +33,10 @@ https://github.com/fastlane/fastlane/issues/17539
|
|
33
33
|
|
34
34
|
## Usage
|
35
35
|
|
36
|
-
#####
|
36
|
+
##### Install plugin for fastlane
|
37
37
|
[install instructions](https://docs.fastlane.tools/plugins/using-plugins/)
|
38
38
|
```
|
39
|
-
bundle
|
39
|
+
bundle exec fastlane add_plugin taiwan_number_one
|
40
40
|
```
|
41
41
|
but I personally prefer adding plugin in `Gemfile` like this to avoid additional `Pluginfile` in ~'your_ios_project_dir'/fastlane
|
42
42
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require "fastlane/action"
|
2
|
-
require "
|
2
|
+
require "spaceship"
|
3
3
|
require_relative "../helper/taiwan_number_one_helper"
|
4
4
|
|
5
5
|
module Fastlane
|
@@ -62,10 +62,10 @@ module Fastlane
|
|
62
62
|
UI.message("version #{version_string} is #{state}")
|
63
63
|
unless state == Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PENDING_DEVELOPER_RELEASE
|
64
64
|
UI.message("AppStoreState is not PENDING_DEVELOPER_RELEASE")
|
65
|
+
UI.message("🇹🇼 Taiwan helps you do nothing!")
|
65
66
|
return
|
66
67
|
end
|
67
|
-
decision
|
68
|
-
decision ||= fetch_decision
|
68
|
+
decision ||= fetch_decision(params)
|
69
69
|
|
70
70
|
result = ActionResult::DO_NOTHING
|
71
71
|
case decision
|
@@ -81,23 +81,26 @@ module Fastlane
|
|
81
81
|
end
|
82
82
|
|
83
83
|
UI.message("The taiwan_number_one plugin action is finished!")
|
84
|
+
UI.message("🇹🇼 Taiwan can help!")
|
84
85
|
return result
|
85
86
|
else
|
86
87
|
UI.message("no pending release version exist.")
|
87
88
|
UI.message("The taiwan_number_one plugin action is finished!")
|
89
|
+
UI.message("🇹🇼 Taiwan can help!")
|
88
90
|
return ActionResult::DO_NOTHING
|
89
91
|
end
|
90
92
|
rescue => error
|
93
|
+
UI.message("🇹🇼 Taiwan might not be able to help you with this...")
|
91
94
|
UI.user_error!("The taiwan_number_one plugin action is finished with error: #{error.message}!")
|
92
95
|
return ActionResult::DO_NOTHING
|
93
96
|
end
|
94
97
|
end
|
95
98
|
|
96
|
-
def self.fetch_decision
|
97
|
-
decision =
|
99
|
+
def self.fetch_decision(params)
|
100
|
+
decision = params[:app_decision]
|
98
101
|
until ["release", "reject"].include?(decision)
|
99
|
-
|
100
|
-
|
102
|
+
UI.user_error!("App's decision must be release or reject.")
|
103
|
+
return
|
101
104
|
end
|
102
105
|
# return decision
|
103
106
|
UI.message("return type #{decision}")
|
@@ -119,8 +122,7 @@ module Fastlane
|
|
119
122
|
UI.message("release version #{app_store_version.version_string} successfully!")
|
120
123
|
return ActionResult::SUCCESS
|
121
124
|
rescue => e
|
122
|
-
UI.user_error!("An error occurred while releasing version #{app_store_version}")
|
123
|
-
UI.error("#{e.message}\n#{e.backtrace.join("\n")}") if FastlaneCore::Globals.verbose?
|
125
|
+
UI.user_error!("An error occurred while releasing version #{app_store_version}, #{e.message}\n#{e.backtrace.join("\n")}")
|
124
126
|
return ActionResult::DO_NOTHING
|
125
127
|
end
|
126
128
|
end
|
@@ -160,10 +162,16 @@ module Fastlane
|
|
160
162
|
end
|
161
163
|
|
162
164
|
def self.details
|
163
|
-
# Optional:
|
164
165
|
"use fastlane to release or reject reviewed version"
|
165
166
|
end
|
166
167
|
|
168
|
+
def self.output
|
169
|
+
[
|
170
|
+
[ActionResult::SUCCESS, 'Successfully release or reject.'],
|
171
|
+
[ActionResult::DO_NOTHING, 'Do nothing.']
|
172
|
+
]
|
173
|
+
end
|
174
|
+
|
167
175
|
def self.available_options
|
168
176
|
user = CredentialsManager::AppfileConfig.try_fetch_value(:itunes_connect_id)
|
169
177
|
user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
|
@@ -241,7 +249,7 @@ module Fastlane
|
|
241
249
|
[
|
242
250
|
'taiwan_number_one(
|
243
251
|
app_decision: "release",
|
244
|
-
api_key: "api_key" # your app_store_connect_api_key
|
252
|
+
api_key: "api_key" # your app_store_connect_api_key
|
245
253
|
)'
|
246
254
|
]
|
247
255
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-taiwan_number_one
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- andrew54068
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|