fastlane-plugin-tpa 2.0.4 → 2.1.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: e6eaa3902a5ba4c32eb9cecd7294c7f99a849813876afa46642235d776721c1e
4
- data.tar.gz: 47feca35c2eeb42d7ff527c61cedfd594c298ee49109103516784570bd0a6596
3
+ metadata.gz: 9b33f7eb300412978f4f88b0006bd328b1772ffd42259e8fbcf4b03edda6281d
4
+ data.tar.gz: '0828d5c80aaaf3a469c47dd13c7b267f8f18a25d20fc252895a82963bf042b92'
5
5
  SHA512:
6
- metadata.gz: 6b0aab54f39c098b7808814999ab79e0413223ba96b219593afad2813906ac159680508c0203be931bdd0f2afb96a77d4af64c0335ff23c838daf0742743ec6e
7
- data.tar.gz: d2fa68ff8e83f048ed1877ed6dcd4e163248af6e6560b8e79d2120ed710eeedc9470cb5a8e843fbcdb8c43720d8b487e52b759a3187c1d0d0118692a722032d2
6
+ metadata.gz: 3b5330d4c162f8149fe9be10dfd43ddc0f58a6c7515e75b7ddb1c83819fd498062a0c68f6bd4f8525ef0baa243bca262bab65ba6a4597db232cdf4186dd2cc2c
7
+ data.tar.gz: f15c84d849a36521aca5398f319a54bbaedc96e243ecfa20cda76c0af952138f0a139960dc96b4fbe3716d432b1cc70cf44721c2d152eb2a2cdd514ac8ce0ff6
@@ -1,5 +1,12 @@
1
1
  module Fastlane
2
2
  module Actions
3
+ module SharedValues
4
+ # Direct installation URL to the uploaded app
5
+ TPA_INSTALL_URL = :TPA_INSTALL_URL
6
+ # URL to tpa.io where you can see (and download) the app
7
+ TPA_BUILD_URL = :TPA_BUILD_URL
8
+ end
9
+
3
10
  class UploadToTpaAction < Action
4
11
  def self.run(params)
5
12
  require 'rest_client'
@@ -8,18 +15,29 @@ module Fastlane
8
15
  headers = headers(params)
9
16
  body = body(params)
10
17
 
11
- UI.message("Going to upload app to TPA")
12
- UI.success("This might take a few minutes. Please don't interrupt the script.")
18
+ UI.success("🚀 Uploading app to TPA 🚀")
19
+ UI.important("This might take a few minutes. Please don't interrupt the script. 🚀")
13
20
 
14
21
  # Starts the upload
15
22
  begin
16
- RestClient.post(upload_url, body, headers)
23
+ response = RestClient.post(upload_url, body, headers)
24
+ if Fastlane::Helper::TpaHelper.valid_json?(response)
25
+ res = JSON.parse(response)
26
+ app_name = res["name"]
27
+ version = res["version_string"]
28
+ build_number = res["version_number"]
29
+ build_url = res["build_url"]
30
+ install_url = res["install_url"]
31
+ Actions.lane_context[SharedValues::TPA_INSTALL_URL] = install_url
32
+ Actions.lane_context[SharedValues::TPA_BUILD_URL] = build_url
33
+ UI.success("🎉 #{app_name} version #{version} (#{build_number}) has successfully been uploaded to TPA 🎉")
34
+ else
35
+ UI.abort_with_message!("Something went wrong while uploading your app to TPA")
36
+ end
17
37
  rescue RestClient::ExceptionWithResponse => ex
18
38
  handle_exception_response(ex)
19
39
  rescue => ex
20
- UI.user_error!("Something went wrong while uploading your app to TPA: #{ex}")
21
- else
22
- UI.success("🎉 Your app has successfully been uploaded to TPA 🎉")
40
+ UI.abort_with_message!("Something went wrong while uploading your app to TPA: #{ex}")
23
41
  end
24
42
  end
25
43
 
@@ -68,7 +86,7 @@ module Fastlane
68
86
  if File.exist?(mapping)
69
87
  mapping_files.push(File.new(mapping, 'rb'))
70
88
  else
71
- UI.message "Unable to find mapping file at #{mapping}"
89
+ UI.message("Unable to find mapping file at #{mapping}")
72
90
  end
73
91
  end
74
92
  unless mapping_files.empty?
@@ -173,7 +191,7 @@ module Fastlane
173
191
  end
174
192
 
175
193
  def self.authors
176
- ["mbogh", "Stefan Veis Pennerup"]
194
+ ["mbogh", "Stefan Veis Pennerup", "madsbogeskov"]
177
195
  end
178
196
 
179
197
  def self.is_supported?(platform)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Tpa
3
- VERSION = "2.0.4"
3
+ VERSION = "2.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-tpa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Perfect App
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-05 00:00:00.000000000 Z
11
+ date: 2019-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  - !ruby/object:Gem::Version
199
199
  version: '0'
200
200
  requirements: []
201
- rubygems_version: 3.0.1
201
+ rubygems_version: 3.0.6
202
202
  signing_key:
203
203
  specification_version: 4
204
204
  summary: TPA gives you advanced user behaviour analytics, app distribution, crash