fastlane-plugin-tpa 1.0.1 → 1.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
  SHA1:
3
- metadata.gz: ef6f5040db568410f5e731a66a67338095e92951
4
- data.tar.gz: 9e878f213bfeeb4c393bd4de1719fdab184ea1b9
3
+ metadata.gz: f9cef460a2915cb5e528bcc0c37563910ddf240c
4
+ data.tar.gz: 8998c1cfe40e3744b38a6091b2a9d9f52dafabab
5
5
  SHA512:
6
- metadata.gz: c95b4426e1abbda384d0a1d8a34af9f8e55e88728884b49ad51e506372b528ea504bfef6339c7c0fafa8dc8131c1973d6eea23a530221ecc6174e0fb7a9f8e37
7
- data.tar.gz: 107aa6cbf042c6686a95da7718aa576e7115b56a4036e10dc08bda208e727eef165b854ae4fa9b123035db79fc8799586aee7d62d4c48db71446fd878f63ea96
6
+ metadata.gz: a91104fc717f4673aa4b1f8745d1cfb78007bef915ad53c208c91c621e2f259d4a172135fec0b925e74a9a11e02d0b0f7078284b8e625eac58aa62f2708248a1
7
+ data.tar.gz: aa0e9dd89fce56fae6d123dc0ea02df3c0b68680a93e426b8dd79e56f0bf7c644024d3b31e7a1fa84228fbe96924ed470c53498d340f63654b2399fb39f16177
@@ -7,15 +7,16 @@ module Fastlane
7
7
  command << verbose(params)
8
8
  command += upload_options(params)
9
9
  command << upload_url(params)
10
+ command << "--no-buffer -w \" | http_status %{http_code}\""
10
11
 
11
12
  shell_command = command.join(' ')
12
13
  return shell_command if Helper.is_test?
13
- result = Actions.sh(shell_command, log: params[:verbose])
14
+ result = Helper.backticks(shell_command, print: params[:verbose])
14
15
  fail_on_error(result)
15
16
  end
16
17
 
17
18
  def self.fail_on_error(result)
18
- if result == "OK"
19
+ if result.include? '| http_status 200'
19
20
  UI.success('Your app has been uploaded to TPA')
20
21
  else
21
22
  UI.user_error!("Something went wrong while uploading your app to TPA: #{result}")
@@ -26,10 +27,10 @@ module Fastlane
26
27
  app_file = app_file(params)
27
28
 
28
29
  options = []
29
- options << "-F app=@#{app_file}"
30
+ options << "-F app=@\"#{app_file}\""
30
31
 
31
32
  if params[:mapping]
32
- options << "-F mapping=@#{params[:mapping]}"
33
+ options << "-F mapping=@\"#{params[:mapping]}\""
33
34
  end
34
35
 
35
36
  options << "-F publish=#{params[:publish]}"
@@ -38,6 +39,10 @@ module Fastlane
38
39
  options << "-F notes=#{params[:notes]}"
39
40
  end
40
41
 
42
+ if params[:progress_bar]
43
+ options << "--progress-bar"
44
+ end
45
+
41
46
  options << "-F force=#{params[:force]}"
42
47
 
43
48
  options
@@ -61,7 +66,11 @@ module Fastlane
61
66
  end
62
67
 
63
68
  def self.verbose(params)
64
- params[:verbose] ? "--verbose" : "--silent"
69
+ if params[:verbose]
70
+ "--verbose"
71
+ elsif !params[:progress_bar]
72
+ "--silent"
73
+ end
65
74
  end
66
75
 
67
76
  #####################################################
@@ -72,6 +81,7 @@ module Fastlane
72
81
  "Upload builds to The Perfect App (TPA.io)"
73
82
  end
74
83
 
84
+ # rubocop:disable Metrics/MethodLength
75
85
  def self.available_options
76
86
  [
77
87
  FastlaneCore::ConfigItem.new(key: :ipa,
@@ -110,12 +120,12 @@ module Fastlane
110
120
  env_name: "FL_TPA_UPLOAD_URL",
111
121
  description: "TPA Upload URL",
112
122
  verify_block: proc do |value|
113
- UI.user_error!("Please pass your TPA Upload URL using `ENV['TPA_UPLOAD_URL'] = 'value'`") unless value
123
+ UI.user_error!("Please pass your TPA Upload URL using `ENV['FL_TPA_UPLOAD_URL'] = 'value'`") unless value
114
124
  end),
115
125
  FastlaneCore::ConfigItem.new(key: :publish,
116
126
  env_name: "FL_TPA_PUBLISH",
117
127
  description: "Publish build upon upload",
118
- default_value: false,
128
+ default_value: true,
119
129
  is_string: false),
120
130
  FastlaneCore::ConfigItem.new(key: :force,
121
131
  env_name: "FL_TPA_FORCE",
@@ -131,9 +141,16 @@ module Fastlane
131
141
  description: "Detailed output",
132
142
  is_string: false,
133
143
  default_value: false,
144
+ optional: true),
145
+ FastlaneCore::ConfigItem.new(key: :progress_bar,
146
+ env_name: "FL_TPA_PROGRESS_BAR",
147
+ description: "Show progress bar of upload",
148
+ is_string: false,
149
+ default_value: true,
134
150
  optional: true)
135
151
  ]
136
152
  end
153
+ # rubocop:enable Metrics/MethodLength
137
154
 
138
155
  def self.authors
139
156
  ["mbogh"]
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Tpa
3
- VERSION = "1.0.1"
3
+ VERSION = "1.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: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morten Bøgh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-01 00:00:00.000000000 Z
11
+ date: 2016-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry