supply 0.1.0 → 0.2.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: a1f6aec39713c442c7cf6c016adf72de551c4840
4
- data.tar.gz: 4c90a7c8593ee2bdd1aadf4a2b7cde5ccf634391
3
+ metadata.gz: 6361659302d5c93b42137c5ad2384fa4f11f6c2a
4
+ data.tar.gz: 7de189f63fa4f4a70e2c148be96ff2b7f497e62a
5
5
  SHA512:
6
- metadata.gz: 172083dc2933041068b9baa25ae195459a80a190b13a7e8c7444586202965320810ef7f6e1ddc3dd9c8bcb6ecbce50653f797718c3625f5fa705999704f99a8c
7
- data.tar.gz: 7fec136b36bda2b83559e68af798560e28058de0a51c792ae9675454a2697760deb87eb237899856453a93557b282acb4ed9422cbeeb6528c0cf6b81deb92afc
6
+ metadata.gz: 2aa2d1d9bd96a7885cddb29ead58df2abd66aa7970214280e97ffb3e194baae23a2156764244286afdf9138550c8ff1aa8f8a77029bbc43c10266c8a89664a96
7
+ data.tar.gz: 2e26de46e4b56c522bd374cbd6edb03656f2c14cf95e45d92faf9f6c5c6468e991efd0c34948bb967dccc5c17dee49f2bf08251bba2c1c67155567f3a19ca27b
data/README.md CHANGED
@@ -6,18 +6,18 @@
6
6
  </a>
7
7
  </h3>
8
8
  <p align="center">
9
- <a href="https://github.com/KrauseFx/deliver">deliver</a> &bull;
9
+ <a href="https://github.com/KrauseFx/deliver">deliver</a> &bull;
10
10
  <a href="https://github.com/KrauseFx/snapshot">snapshot</a> &bull;
11
11
  <a href="https://github.com/KrauseFx/frameit">frameit</a> &bull;
12
12
  <a href="https://github.com/KrauseFx/PEM">PEM</a> &bull;
13
- <a href="https://github.com/KrauseFx/sigh">sigh</a> &bull;
13
+ <a href="https://github.com/KrauseFx/sigh">sigh</a> &bull;
14
14
  <a href="https://github.com/KrauseFx/produce">produce</a> &bull;
15
15
  <a href="https://github.com/KrauseFx/cert">cert</a> &bull;
16
- <a href="https://github.com/KrauseFx/codes">codes</a> &bull;
17
16
  <a href="https://github.com/fastlane/spaceship">spaceship</a> &bull;
18
17
  <a href="https://github.com/fastlane/pilot">pilot</a> &bull;
19
18
  <a href="https://github.com/fastlane/boarding">boarding</a> &bull;
20
- <a href="https://github.com/fastlane/gym">gym</a>
19
+ <a href="https://github.com/fastlane/gym">gym</a> &bull;
20
+ <a href="https://github.com/fastlane/scan">scan</a>
21
21
  </p>
22
22
  -------
23
23
 
@@ -44,9 +44,9 @@ Get in contact with the developer on Twitter: [@KrauseFx](https://twitter.com/Kr
44
44
  <a href="#installation">Installation</a> &bull;
45
45
  <a href="#setup">Setup</a> &bull;
46
46
  <a href="#quick-start">Quick Start</a> &bull;
47
- <a href="#available-commands">Available Commands</a> &bull;
47
+ <a href="#available-commands">Commands</a> &bull;
48
48
  <a href="#uploading-an-apk">Uploading an APK</a> &bull;
49
- <a href="#images-and-screenshots">Images and Screenshots</a> &bull;
49
+ <a href="#images-and-screenshots">Images</a>
50
50
  </p>
51
51
 
52
52
  -------
@@ -97,10 +97,20 @@ You can either run `supply` on its own and use it interactively, or you can pass
97
97
 
98
98
  ## Uploading an APK
99
99
 
100
- Simply run `supply --apk path/to/app.apk`, or use the `SUPPLY_APK` environment variable.
100
+ To upload a new binary to Google Play, simply run
101
+
102
+ ```
103
+ supply --apk path/to/app.apk
104
+ ```
101
105
 
102
106
  This will also upload app metadata if you previously ran `supply init`.
103
107
 
108
+ To gradually roll out a new build use
109
+
110
+ ```
111
+ supply --apk path/app.apk --track rollout --rollout 0.5
112
+ ```
113
+
104
114
  ## Images and Screenshots
105
115
 
106
116
  After running `supply init`, you will have a metadata directory. This directory contains one or more locale directories (e.g. en-US, en-GB, etc.), and inside this directory are text files such as `title.txt` and `short.txt`.
@@ -191,6 +191,10 @@ module Supply
191
191
  end
192
192
 
193
193
  def upload_apk_to_track(path_to_apk, track)
194
+ upload_apk_to_track_with_rollout(path_to_apk, track, 1.0)
195
+ end
196
+
197
+ def upload_apk_to_track_with_rollout(path_to_apk, track, rollout)
194
198
  ensure_active_edit!
195
199
 
196
200
  apk = Google::APIClient::UploadIO.new(File.expand_path(path_to_apk), 'application/vnd.android.package-archive')
@@ -209,7 +213,7 @@ module Supply
209
213
 
210
214
  track_body = {
211
215
  'track' => track,
212
- 'userFraction' => 1,
216
+ 'userFraction' => rollout,
213
217
  'versionCodes' => [result_upload.data.versionCode]
214
218
  }
215
219
 
@@ -19,8 +19,8 @@ module Supply
19
19
 
20
20
  def run
21
21
  program :version, Supply::VERSION
22
- program :description, 'CLI for \'supply\' - TODO'
23
- program :help, 'Author', 'Felix Krause <supply@krausefx.com>, Reinhard Hafenscher <TODO>'
22
+ program :description, Supply::DESCRIPTION
23
+ program :help, 'Author', 'Felix Krause <supply@krausefx.com>'
24
24
  program :help, 'Website', 'https://fastlane.tools'
25
25
  program :help, 'GitHub', 'https://github.com/fastlane/supply'
26
26
  program :help_formatter, :compact
@@ -13,10 +13,18 @@ module Supply
13
13
  FastlaneCore::ConfigItem.new(key: :track,
14
14
  short_option: "-a",
15
15
  env_name: "SUPPLY_TRACK",
16
- description: "The Track to upload the Application to: production, beta, alpha",
16
+ description: "The Track to upload the Application to: production, beta, alpha or rollout",
17
17
  default_value: 'production',
18
18
  verify_block: proc do |value|
19
- available = %w(production beta alpha)
19
+ available = %w(production beta alpha rollout)
20
+ raise "Invalid value '#{value}', must be #{available.join(', ')}".red unless available.include? value
21
+ end),
22
+ FastlaneCore::ConfigItem.new(key: :rollout,
23
+ short_option: "-r",
24
+ description: "The percentage of the rollout",
25
+ default_value: '1.0',
26
+ verify_block: proc do |value|
27
+ available = %w(0.005 0.01 0.05 0.1 0.2 0.5 1.0)
20
28
  raise "Invalid value '#{value}', must be #{available.join(', ')}".red unless available.include? value
21
29
  end),
22
30
  FastlaneCore::ConfigItem.new(key: :metadata_path,
@@ -57,7 +57,7 @@ module Supply
57
57
 
58
58
  client.clear_screenshots(image_type: screenshot_type, language: language)
59
59
 
60
- paths.each do |path|
60
+ paths.sort.each do |path|
61
61
  Helper.log.info "Uploading screenshot #{path}..."
62
62
  client.upload_image(image_path: File.expand_path(path),
63
63
  image_type: screenshot_type,
@@ -69,7 +69,11 @@ module Supply
69
69
  def upload_binary
70
70
  if Supply.config[:apk]
71
71
  Helper.log.info "Preparing apk at path '#{Supply.config[:apk]}' for upload..."
72
- client.upload_apk_to_track(Supply.config[:apk], Supply.config[:track])
72
+ if Supply.config[:track].eql? "rollout"
73
+ client.upload_apk_to_track_with_rollout(Supply.config[:apk], Supply.config[:track], Supply.config[:rollout])
74
+ else
75
+ client.upload_apk_to_track(Supply.config[:apk], Supply.config[:track])
76
+ end
73
77
  else
74
78
  Helper.log.info "No apk file found, you can pass the path to your apk using the `apk` option"
75
79
  end
@@ -1,4 +1,4 @@
1
1
  module Supply
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  DESCRIPTION = "Command line tool for updating Android apps and their metadata on the Google Play Store"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supply
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2015-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client