fastlane-plugin-taiwan_number_one 1.1.2 → 1.1.4

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: d96498468a5871d8e612adb663a7f446ce026e9dfb1ba3ee6a6df3689d2ac786
4
- data.tar.gz: 285b7cb87df61d33b387690f9d06c06e9834e078d6948ee46c7a1388eea342b9
3
+ metadata.gz: 76f22b15999767ab0a862e7ae9b411b5e227d1b40b0ef1404ea15d6cb1501bee
4
+ data.tar.gz: 29715423d5b09a5f19553789f1da2594532b5e46bb7371b18734c86556cd9609
5
5
  SHA512:
6
- metadata.gz: 12ce29515257361ae7f814ca0fc93dd026a456c211457085071b353bf241ef10631b28ce1569bc3d20307e583e7f0b7dffb09da73a4e5619dfba6669d6c0b812
7
- data.tar.gz: 8558a7f279b12c8e4efe192700cccd08ba2867903c71c60ecd346487e93143dfa2b032a9a8d775bb0a5fedd5efb3d9966a57db22ad2ceecefd85c6edf29e4ffc
6
+ metadata.gz: 2cce2d8b08b588021449a00f5777203fed25e172721d47fc55bea30c28e15479925be549644d9c07c5fe8269965ec6d46d909fa1610fae98db0b0ac3b4827cae
7
+ data.tar.gz: b2b9ecb64148d638a213c740b382ad05ea89be9dd4336ffeffd5b5a8fd891ca59485435f835c41580893085f417263b865ef474c2000f19139ae036ba13898fd
@@ -17,7 +17,6 @@ module Fastlane
17
17
 
18
18
  def self.run(params)
19
19
  begin
20
- params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
21
20
 
22
21
  app_id = params.fetch(:app_identifier)
23
22
  username = params.fetch(:username)
@@ -80,7 +79,7 @@ module Fastlane
80
79
  case decision
81
80
  when DecisionType::RELEASE
82
81
  UI.message("decision is release")
83
- result = release_version_if_possible(client: client, app_store_version: app_store_version, token: token)
82
+ result = release_version_if_possible(app: app, app_store_version: app_store_version, token: token)
84
83
  when DecisionType::REJECT
85
84
  UI.message("decision is reject")
86
85
  result = reject_version_if_possible(client: client, app_store_version: app_store_version)
@@ -126,23 +125,13 @@ module Fastlane
126
125
  return ActionResult::DO_NOTHING
127
126
  end
128
127
 
129
- begin
130
- if token
131
- now = Time.now
132
- release_date_string = now.strftime("%Y-%m-%dT%H:00%:z")
133
- app_store_version.update(attributes: {
134
- earliest_release_date: release_date_string,
135
- release_type: Spaceship::ConnectAPI::AppStoreVersion::ReleaseType::SCHEDULED
136
- })
137
- return ActionResult::SUCCESS
138
- else
139
- app_store_version.create_app_store_version_release_request
140
- UI.message("release version #{app_store_version.version_string} successfully!")
141
- return ActionResult::SUCCESS
142
- end
143
- rescue => e
144
- UI.user_error!("An error occurred while releasing version #{app_store_version}, #{e.message}\n#{e.backtrace.join("\n")}")
145
- return ActionResult::DO_NOTHING
128
+ version = app.get_pending_release_app_store_version
129
+ if version.nil? == false
130
+ Spaceship::ConnectAPI.post_app_store_version_release_request(app_store_version_id: version.id)
131
+ UI.message("release version #{app_store_version} successfully!")
132
+ return ActionResult::SUCCESS
133
+ else
134
+ UI.user_error!("version not found while releasing version #{app_store_version}, #{e.message}\n#{e.backtrace.join("\n")}")
146
135
  end
147
136
  end
148
137
 
@@ -163,7 +152,7 @@ module Fastlane
163
152
 
164
153
  def self.api_token(params)
165
154
  params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
166
- api_token ||= Spaceship::ConnectAPI::Token.create(params[:api_key]) if params[:api_key]
155
+ api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
167
156
  api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
168
157
  return api_token
169
158
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module TaiwanNumberOne
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.4"
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: 1.1.2
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - andrew54068
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-31 00:00:00.000000000 Z
11
+ date: 2022-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry