fastlane-plugin-taiwan_number_one 0.2.7 → 1.0.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: 29c9d03d5a2a3660d0b4e40788ed3d4459c08f2334d8d4f66350df8dbd58c8d9
4
- data.tar.gz: '05458abd7384ce522b853a35d69de92bae36bbaab821f400d69881d1f8e59c70'
3
+ metadata.gz: 3d5f839980b3d9ad947203474ba62973abaf7b768dafd9d17518761cb3482605
4
+ data.tar.gz: 70e6328b3fb8693a83d6979dadf51ac0e8fa47bd4d74b3403f15ac525611b196
5
5
  SHA512:
6
- metadata.gz: 9b972ebe636be3276847abf501996e662822a163b4bee572b88557fa7477352f7e7aa3a83c160fdaca169dc9ad2ce3869a34c7527f7255b9f4daabf3a4daabc7
7
- data.tar.gz: b98462a5fb3438b0bb3dc6c21586ef0af9e07e90f5c59c14b7c9a1ac78e457e562a807a1938f232782781925639d41c2c12624419307ac69ccc7dc597f562cae
6
+ metadata.gz: 1535dc058ad8feb38de1d1c473db917f84e9afb01f5de45e9e4043b12332b67b15e173d2186974f8103cf120f11851f66d2880ceea135a0f87b935c5367c9bc0
7
+ data.tar.gz: 9bfbb71e768956fb71f98f42109535bec08fae6ab4dd64c801ae77860c71504d689e6d20b7dccf54a6d9a63872d0a9574d2eade3dd95d1ffd02bbbd024bd1c42
@@ -5,7 +5,7 @@ require_relative "../helper/taiwan_number_one_helper"
5
5
  module Fastlane
6
6
  module Actions
7
7
  class TaiwanNumberOneAction < Action
8
- module DicisionType
8
+ module DecisionType
9
9
  RELEASE = "release"
10
10
  REJECT = "reject"
11
11
  end
@@ -53,6 +53,15 @@ module Fastlane
53
53
  ].join(","),
54
54
  platform: platform
55
55
  }
56
+
57
+ if params[:force] && decision == DecisionType::REJECT
58
+ UI.message("decision is reject")
59
+ app_store_version = app.get_app_store_versions(client: client, includes: "appStoreVersionSubmission")
60
+ .sort_by { |v| Gem::Version.new(v.version_string) }
61
+ .last
62
+ return reject_version_if_possible(app: app, app_store_version: app_store_version)
63
+ end
64
+
56
65
  app_store_version = app.get_app_store_versions(client: client, filter: filter, includes: "appStoreVersionSubmission")
57
66
  .sort_by { |v| Gem::Version.new(v.version_string) }
58
67
  .last
@@ -63,16 +72,16 @@ module Fastlane
63
72
  unless state == Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PENDING_DEVELOPER_RELEASE
64
73
  UI.message("AppStoreState is not PENDING_DEVELOPER_RELEASE")
65
74
  UI.message("🇹🇼 Taiwan helps you do nothing!")
66
- return
75
+ return ActionResult::DO_NOTHING
67
76
  end
68
77
  decision ||= fetch_decision(params)
69
78
 
70
79
  result = ActionResult::DO_NOTHING
71
80
  case decision
72
- when DicisionType::RELEASE
81
+ when DecisionType::RELEASE
73
82
  UI.message("decision is release")
74
83
  result = release_version_if_possible(app: app, app_store_version: app_store_version, token: token)
75
- when DicisionType::REJECT
84
+ when DecisionType::REJECT
76
85
  UI.message("decision is reject")
77
86
  result = reject_version_if_possible(app: app, app_store_version: app_store_version)
78
87
  else
@@ -104,10 +113,10 @@ module Fastlane
104
113
  end
105
114
  # return decision
106
115
  UI.message("return type #{decision}")
107
- if decision == DicisionType::RELEASE
108
- return DicisionType::RELEASE
116
+ if decision == DecisionType::RELEASE
117
+ return DecisionType::RELEASE
109
118
  else
110
- return DicisionType::REJECT
119
+ return DecisionType::REJECT
111
120
  end
112
121
  end
113
122
 
@@ -190,7 +199,7 @@ module Fastlane
190
199
  env_name: "app_decision",
191
200
  description: "A description of your decision, should be release or reject",
192
201
  optional: false,
193
- default_value: DicisionType::RELEASE,
202
+ default_value: DecisionType::RELEASE,
194
203
  type: String),
195
204
  FastlaneCore::ConfigItem.new(key: :username,
196
205
  short_option: "-u",
@@ -244,7 +253,12 @@ module Fastlane
244
253
  type: Hash,
245
254
  optional: true,
246
255
  sensitive: true,
247
- conflicting_options: [:api_key_path])
256
+ conflicting_options: [:api_key_path]),
257
+ FastlaneCore::ConfigItem.new(key: :force,
258
+ env_name: "FL_DECISION_FORCE",
259
+ description: "Skip verifying of current version state for reject reviewed version or cancel waiting review version",
260
+ is_string: false,
261
+ default_value: false),
248
262
  ]
249
263
  end
250
264
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module TaiwanNumberOne
3
- VERSION = "0.2.7"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  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.7
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - andrew54068
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-09 00:00:00.000000000 Z
11
+ date: 2021-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry