supply 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -13
- data/lib/supply/client.rb +10 -2
- data/lib/supply/options.rb +12 -5
- data/lib/supply/uploader.rb +13 -5
- data/lib/supply/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b80b8bd3de26da54834384517a37b949a83753c7
|
4
|
+
data.tar.gz: b4686049115f0ec20e60bb1e50963e42eee75f6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0393c751ec015a5849cc7b122c9203afdd6c09a1ddd0a65f8fe63b6e492973431747e5d1a97f9cc0037d0e76be112cf70c9e3bdff777dde1a0e046795ac14762
|
7
|
+
data.tar.gz: 5a5a1cd23e48b4a91ca28eac37270c9304045c7a5ab250ebdbda72cb37c67fc57ab943a0d51f7b0067c0520c22c1cb033aba9833a0469451b2dc540c16062c5b
|
data/README.md
CHANGED
@@ -32,7 +32,6 @@ supply
|
|
32
32
|
[](https://twitter.com/FastlaneTools)
|
33
33
|
[](https://github.com/fastlane/fastlane/blob/master/supply/LICENSE)
|
34
34
|
[](http://rubygems.org/gems/supply)
|
35
|
-
[](https://circleci.com/gh/fastlane/fastlane)
|
36
35
|
|
37
36
|
###### Command line tool for updating Android apps and their metadata on the Google Play Store
|
38
37
|
|
@@ -54,7 +53,7 @@ Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.c
|
|
54
53
|
|
55
54
|
-------
|
56
55
|
|
57
|
-
<h5 align="center"><code>supply</code> is part of <a href="https://fastlane.tools">fastlane</a>: The easiest way to automate
|
56
|
+
<h5 align="center"><code>supply</code> is part of <a href="https://fastlane.tools">fastlane</a>: The easiest way to automate beta deployments and releases for your iOS and Android apps.</h5>
|
58
57
|
|
59
58
|
## Features
|
60
59
|
- Update existing Android applications on Google Play via the command line
|
@@ -75,15 +74,20 @@ Install the gem
|
|
75
74
|
|
76
75
|
Setup consists of setting up your Google Developers Service Account
|
77
76
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
77
|
+
1. Open the [Google Play Console](https://play.google.com/apps/publish/)
|
78
|
+
1. Select **Settings** tab, followed by the **API access** tab
|
79
|
+
1. Click the **Create Service Account** button and follow the **Google API Console** link in the dialog
|
80
|
+
1. Click the **Create Service account** button at the top of the developers console screen
|
81
|
+
1. Provide a name for the service account
|
82
|
+
1. Click **Select a role** and choose **Project > Service Account Actor**
|
83
|
+
1. Check the **Furnish a new private key** checkbox
|
84
|
+
1. Select **JSON** as the Key type
|
85
|
+
1. Click **Create** to close the dialog
|
86
|
+
1. Make a note of the file name of the JSON file downloaded to your computer
|
87
|
+
1. Back on the Google Play developer console, click **Done** to close the dialog
|
88
|
+
1. Click on **Grant Access** for the newly added service account
|
89
|
+
1. Choose **Release Manager** from the **Role** dropdown
|
90
|
+
1. Click **Add user** to close the dialog
|
87
91
|
|
88
92
|
### Migrating Google credential format (from .p12 key file to .json)
|
89
93
|
|
@@ -173,7 +177,7 @@ You can add changelog files under the `changelogs/` directory for each locale. T
|
|
173
177
|
|
174
178
|
## Track Promotion
|
175
179
|
|
176
|
-
A common Play publishing scenario might involve uploading an APK version to a test track, testing it, and finally promoting that version to production.
|
180
|
+
A common Play publishing scenario might involve uploading an APK version to a test track, testing it, and finally promoting that version to production.
|
177
181
|
|
178
182
|
This can be done using the `--track_promote_to` parameter. The `--track_promote_to` parameter works with the `--track` parameter to command the Play API to promote existing Play track APK version(s) (those active on the track identified by the `--track` param value) to a new track (`--track_promote_to` value).
|
179
183
|
|
@@ -181,7 +185,7 @@ This can be done using the `--track_promote_to` parameter. The `--track_promote
|
|
181
185
|
|
182
186
|
### [`fastlane`](https://fastlane.tools) Toolchain
|
183
187
|
|
184
|
-
- [`fastlane`](https://fastlane.tools): The easiest way to automate
|
188
|
+
- [`fastlane`](https://fastlane.tools): The easiest way to automate beta deployments and releases for your iOS and Android apps
|
185
189
|
- [`deliver`](https://github.com/fastlane/fastlane/tree/master/deliver): Upload screenshots, metadata and your app to the App Store
|
186
190
|
- [`snapshot`](https://github.com/fastlane/fastlane/tree/master/snapshot): Automate taking localized screenshots of your iOS app on every device
|
187
191
|
- [`frameit`](https://github.com/fastlane/fastlane/tree/master/frameit): Quickly put your screenshots into the right device frames
|
data/lib/supply/client.rb
CHANGED
@@ -20,10 +20,11 @@ module Supply
|
|
20
20
|
# @!group Login
|
21
21
|
#####################################################
|
22
22
|
|
23
|
-
#
|
23
|
+
# instantiate a client given the supplied configuration
|
24
24
|
def self.make_from_config
|
25
25
|
unless Supply.config[:json_key] || (Supply.config[:key] && Supply.config[:issuer])
|
26
|
-
UI.
|
26
|
+
UI.important("To not be asked about this value, you can specify it using 'json_key'")
|
27
|
+
Supply.config[:json_key] = UI.input("The service account json file used to authenticate with Google: ")
|
27
28
|
end
|
28
29
|
|
29
30
|
return Client.new(path_to_key: Supply.config[:key],
|
@@ -93,6 +94,13 @@ module Supply
|
|
93
94
|
self.current_package_name = nil
|
94
95
|
end
|
95
96
|
|
97
|
+
# Validates the current edit - does not change data on Google Play
|
98
|
+
def validate_current_edit!
|
99
|
+
ensure_active_edit!
|
100
|
+
|
101
|
+
call_google_api { android_publisher.validate_edit(current_package_name, current_edit.id) }
|
102
|
+
end
|
103
|
+
|
96
104
|
# Commits the current edit saving all pending changes on Google Play
|
97
105
|
def commit_current_edit!
|
98
106
|
ensure_active_edit!
|
data/lib/supply/options.rb
CHANGED
@@ -22,11 +22,12 @@ module Supply
|
|
22
22
|
end),
|
23
23
|
FastlaneCore::ConfigItem.new(key: :rollout,
|
24
24
|
short_option: "-r",
|
25
|
-
description: "The percentage of the rollout",
|
26
|
-
default_value: '1
|
25
|
+
description: "The percentage of the user fraction when uploading to the rollout track",
|
26
|
+
default_value: '0.1',
|
27
27
|
verify_block: proc do |value|
|
28
|
-
|
29
|
-
|
28
|
+
min = 0.05
|
29
|
+
max = 0.5
|
30
|
+
UI.user_error! "Invalid value '#{value}', must be between #{min} and #{max}" unless value.to_f.between?(min, max)
|
30
31
|
end),
|
31
32
|
FastlaneCore::ConfigItem.new(key: :metadata_path,
|
32
33
|
env_name: "SUPPLY_METADATA_PATH",
|
@@ -120,7 +121,13 @@ module Supply
|
|
120
121
|
verify_block: proc do |value|
|
121
122
|
available = valid_tracks
|
122
123
|
UI.user_error! "Invalid value '#{value}', must be #{available.join(', ')}" unless available.include? value
|
123
|
-
end)
|
124
|
+
end),
|
125
|
+
FastlaneCore::ConfigItem.new(key: :validate_only,
|
126
|
+
env_name: "SUPPLY_VALIDATE_ONLY",
|
127
|
+
optional: true,
|
128
|
+
description: "Indicate that changes will only be validated with Google Play rather than actually published",
|
129
|
+
is_string: false,
|
130
|
+
default_value: false)
|
124
131
|
|
125
132
|
]
|
126
133
|
end
|
data/lib/supply/uploader.rb
CHANGED
@@ -27,16 +27,24 @@ module Supply
|
|
27
27
|
|
28
28
|
promote_track if Supply.config[:track_promote_to]
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
if Supply.config[:validate_only]
|
31
|
+
UI.message("Validating all changes with Google Play...")
|
32
|
+
client.validate_current_edit!
|
33
|
+
UI.success("Successfully validated the upload to Google Play")
|
34
|
+
else
|
35
|
+
UI.message("Uploading all changes to Google Play...")
|
36
|
+
client.commit_current_edit!
|
37
|
+
UI.success("Successfully finished the upload to Google Play")
|
38
|
+
end
|
33
39
|
end
|
34
40
|
|
35
41
|
def promote_track
|
36
42
|
version_codes = client.track_version_codes(Supply.config[:track])
|
37
|
-
|
43
|
+
# the actual value passed for the rollout argument does not matter because it will be ignored by the Google Play API
|
44
|
+
# but it has to be between 0.05 and 0.5 to pass the validity check. So we are passing the default value 0.1
|
45
|
+
client.update_track(Supply.config[:track], 0.1, nil)
|
38
46
|
version_codes.each do |apk_version_code|
|
39
|
-
client.update_track(Supply.config[:track_promote_to],
|
47
|
+
client.update_track(Supply.config[:track_promote_to], Supply.config[:rollout], apk_version_code)
|
40
48
|
end
|
41
49
|
end
|
42
50
|
|
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.8.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: 2016-
|
11
|
+
date: 2016-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-api-client
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.52.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.52.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: credentials_manager
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.16.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.16.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.
|
187
|
+
version: 0.44.0
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.
|
194
|
+
version: 0.44.0
|
195
195
|
description: Command line tool for updating Android apps and their metadata on the
|
196
196
|
Google Play Store
|
197
197
|
email:
|