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 +4 -4
- data/README.md +17 -7
- data/lib/supply/client.rb +5 -1
- data/lib/supply/commands_generator.rb +2 -2
- data/lib/supply/options.rb +10 -2
- data/lib/supply/uploader.rb +6 -2
- data/lib/supply/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6361659302d5c93b42137c5ad2384fa4f11f6c2a
|
4
|
+
data.tar.gz: 7de189f63fa4f4a70e2c148be96ff2b7f497e62a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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> •
|
9
|
+
<a href="https://github.com/KrauseFx/deliver">deliver</a> •
|
10
10
|
<a href="https://github.com/KrauseFx/snapshot">snapshot</a> •
|
11
11
|
<a href="https://github.com/KrauseFx/frameit">frameit</a> •
|
12
12
|
<a href="https://github.com/KrauseFx/PEM">PEM</a> •
|
13
|
-
<a href="https://github.com/KrauseFx/sigh">sigh</a> •
|
13
|
+
<a href="https://github.com/KrauseFx/sigh">sigh</a> •
|
14
14
|
<a href="https://github.com/KrauseFx/produce">produce</a> •
|
15
15
|
<a href="https://github.com/KrauseFx/cert">cert</a> •
|
16
|
-
<a href="https://github.com/KrauseFx/codes">codes</a> •
|
17
16
|
<a href="https://github.com/fastlane/spaceship">spaceship</a> •
|
18
17
|
<a href="https://github.com/fastlane/pilot">pilot</a> •
|
19
18
|
<a href="https://github.com/fastlane/boarding">boarding</a> •
|
20
|
-
<a href="https://github.com/fastlane/gym">gym</a>
|
19
|
+
<a href="https://github.com/fastlane/gym">gym</a> •
|
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> •
|
45
45
|
<a href="#setup">Setup</a> •
|
46
46
|
<a href="#quick-start">Quick Start</a> •
|
47
|
-
<a href="#available-commands">
|
47
|
+
<a href="#available-commands">Commands</a> •
|
48
48
|
<a href="#uploading-an-apk">Uploading an APK</a> •
|
49
|
-
<a href="#images-and-screenshots">Images
|
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
|
-
|
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`.
|
data/lib/supply/client.rb
CHANGED
@@ -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' =>
|
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,
|
23
|
-
program :help, 'Author', 'Felix Krause <supply@krausefx.com
|
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
|
data/lib/supply/options.rb
CHANGED
@@ -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,
|
data/lib/supply/uploader.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/supply/version.rb
CHANGED
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.
|
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-
|
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
|