fastlane-plugin-taiwan_number_one 0.2.6 → 0.2.7

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: 30a7efee5d2102888aacc0c475d952729991da41eae2010bcdbcb289e56392ce
4
- data.tar.gz: '0976e6fcddb1bf2bc35ed104324debc8a8e04718cbbd5347f30d2512b7e0b624'
3
+ metadata.gz: 29c9d03d5a2a3660d0b4e40788ed3d4459c08f2334d8d4f66350df8dbd58c8d9
4
+ data.tar.gz: '05458abd7384ce522b853a35d69de92bae36bbaab821f400d69881d1f8e59c70'
5
5
  SHA512:
6
- metadata.gz: 9ec00137f9b533afe8fcc910d7eb4109ba387a651c1413e457b132de0f61563afd63caf6a6693b1c67ce2c83c91c1b23735cc608ae16cf3c3ca756028b440f10
7
- data.tar.gz: f933489a34359b0374d0b63740888a4e0e1565410502c7c90d6f261149ac007dbe984fd9a6a10375774244fb942adecd1c2b9042d465bb9535fc5ec7b47cb8ea
6
+ metadata.gz: 9b972ebe636be3276847abf501996e662822a163b4bee572b88557fa7477352f7e7aa3a83c160fdaca169dc9ad2ce3869a34c7527f7255b9f4daabf3a4daabc7
7
+ data.tar.gz: b98462a5fb3438b0bb3dc6c21586ef0af9e07e90f5c59c14b7c9a1ac78e457e562a807a1938f232782781925639d41c2c12624419307ac69ccc7dc597f562cae
data/README.md CHANGED
@@ -10,6 +10,7 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
10
10
  fastlane add_plugin taiwan_number_one
11
11
  ```
12
12
 
13
+ Start from v0.2.7 we use this [workaround](https://github.com/fastlane/fastlane/issues/17283#issuecomment-711865915) to solve issue while using App Store Connect Api key.
13
14
  ## About taiwan_number_one
14
15
 
15
16
  To approve or reject if status is `Pending Developer Release`, otherwise do nothing.
@@ -71,7 +71,7 @@ module Fastlane
71
71
  case decision
72
72
  when DicisionType::RELEASE
73
73
  UI.message("decision is release")
74
- result = release_version_if_possible(app: app, app_store_version: app_store_version)
74
+ result = release_version_if_possible(app: app, app_store_version: app_store_version, token: token)
75
75
  when DicisionType::REJECT
76
76
  UI.message("decision is reject")
77
77
  result = reject_version_if_possible(app: app, app_store_version: app_store_version)
@@ -111,16 +111,26 @@ module Fastlane
111
111
  end
112
112
  end
113
113
 
114
- def self.release_version_if_possible(app: nil, app_store_version: Spaceship::ConnectAPI::AppStoreVersion)
114
+ def self.release_version_if_possible(app: nil, app_store_version: Spaceship::ConnectAPI::AppStoreVersion, token: nil)
115
115
  unless app
116
116
  UI.user_error!("Could not find app with bundle identifier '#{params[:app_identifier]}' on account #{params[:username]}")
117
117
  return ActionResult::DO_NOTHING
118
118
  end
119
119
 
120
120
  begin
121
- app_store_version.create_app_store_version_release_request
122
- UI.message("release version #{app_store_version.version_string} successfully!")
123
- return ActionResult::SUCCESS
121
+ if token
122
+ now = Time.now
123
+ release_date_string = now.strftime("%Y-%m-%dT%H:00%:z")
124
+ app_store_version.update(attributes: {
125
+ earliest_release_date: release_date_string,
126
+ release_type: Spaceship::ConnectAPI::AppStoreVersion::ReleaseType::SCHEDULED
127
+ })
128
+ return ActionResult::SUCCESS
129
+ else
130
+ app_store_version.create_app_store_version_release_request
131
+ UI.message("release version #{app_store_version.version_string} successfully!")
132
+ return ActionResult::SUCCESS
133
+ end
124
134
  rescue => e
125
135
  UI.user_error!("An error occurred while releasing version #{app_store_version}, #{e.message}\n#{e.backtrace.join("\n")}")
126
136
  return ActionResult::DO_NOTHING
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module TaiwanNumberOne
3
- VERSION = "0.2.6"
3
+ VERSION = "0.2.7"
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.6
4
+ version: 0.2.7
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-30 00:00:00.000000000 Z
11
+ date: 2021-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry