supply 0.6.2 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a6612ef1ad2b105f9f9706b4122986ae8922f82
4
- data.tar.gz: a138433ae50c3736b72d2422de001b63ef30c9f2
3
+ metadata.gz: 8316f5d177c6aad6b5918f6fe84eaa0d5fd09b31
4
+ data.tar.gz: 96ba141bd6b42ca1aa1f6877ddc65bcfc92cf951
5
5
  SHA512:
6
- metadata.gz: f9aba23f9fc8631f18cb99ca09415cd535497ef7ac01e4d5b3eb3a29ebf6faf6efcbc9120488355424e529b3c3192779273ee2f54fd4951969cc6cdcb5fd79e3
7
- data.tar.gz: 1a2664619e8df2d61a712761dd065bedc358631dd18ab112b81a723be3fa5ea0a2df560b988c954a11737dc9ea1a9c42b98c29abdf63f529d69d9e394b2e6285
6
+ metadata.gz: eb6a753cc0904b8f81e9e33227b72c0dd66eccbf4eb7fc5bf9943209d59ac373da76e105bd9ddadda0b1f98cd2751d85c2e05105c10217f31e0736b8541ea9ae
7
+ data.tar.gz: 63dc0ca244435b0003f0c0c05cc78903a10aeffa3a14a9abc228b11b53288f6196c5b95bbd55414c4c080b27abaccfb20fed7d5b8a4a2617593796f0c383e409
data/README.md CHANGED
@@ -52,7 +52,7 @@ Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.c
52
52
 
53
53
  -------
54
54
 
55
- <h5 align="center"><code>supply</code> is part of <a href="https://fastlane.tools">fastlane</a>: connect all deployment tools into one streamlined workflow.</h5>
55
+ <h5 align="center"><code>supply</code> is part of <a href="https://fastlane.tools">fastlane</a>: The easiest way to automate building and releasing your iOS and Android apps.</h5>
56
56
 
57
57
  ## Features
58
58
  - Update existing Android applications on Google Play via the command line
@@ -169,11 +169,17 @@ You can add changelog files under the `changelogs/` directory for each locale. T
169
169
  └── 100100.txt
170
170
  ```
171
171
 
172
+ ## Track Promotion
173
+
174
+ A common Play publishing scenario might involve uploading an APK version to a test track, testing it, and finally promoting that version to production.
175
+
176
+ 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).
177
+
172
178
  ## Tips
173
179
 
174
180
  ### [`fastlane`](https://fastlane.tools) Toolchain
175
181
 
176
- - [`fastlane`](https://fastlane.tools): Connect all deployment tools into one streamlined workflow
182
+ - [`fastlane`](https://fastlane.tools): The easiest way to automate building and releasing your iOS and Android apps
177
183
  - [`deliver`](https://github.com/fastlane/fastlane/tree/master/deliver): Upload screenshots, metadata and your app to the App Store
178
184
  - [`snapshot`](https://github.com/fastlane/fastlane/tree/master/snapshot): Automate taking localized screenshots of your iOS app on every device
179
185
  - [`frameit`](https://github.com/fastlane/fastlane/tree/master/frameit): Quickly put your screenshots into the right device frames
@@ -212,6 +212,18 @@ module Supply
212
212
  track_body)
213
213
  end
214
214
 
215
+ # Get list of version codes for track
216
+ def track_version_codes(track)
217
+ ensure_active_edit!
218
+
219
+ result = android_publisher.get_track(
220
+ current_package_name,
221
+ current_edit.id,
222
+ track)
223
+
224
+ return result.version_codes
225
+ end
226
+
215
227
  def update_apk_listing_for_language(apk_listing)
216
228
  ensure_active_edit!
217
229
 
@@ -4,6 +4,7 @@ require 'credentials_manager'
4
4
  module Supply
5
5
  class Options
6
6
  def self.available_options
7
+ valid_tracks = %w(production beta alpha rollout)
7
8
  @options ||= [
8
9
  FastlaneCore::ConfigItem.new(key: :package_name,
9
10
  env_name: "SUPPLY_PACKAGE_NAME",
@@ -13,10 +14,10 @@ module Supply
13
14
  FastlaneCore::ConfigItem.new(key: :track,
14
15
  short_option: "-a",
15
16
  env_name: "SUPPLY_TRACK",
16
- description: "The Track to upload the Application to: production, beta, alpha or rollout",
17
+ description: "The Track to upload the Application to: #{valid_tracks.join(', ')}",
17
18
  default_value: 'production',
18
19
  verify_block: proc do |value|
19
- available = %w(production beta alpha rollout)
20
+ available = valid_tracks
20
21
  UI.user_error! "Invalid value '#{value}', must be #{available.join(', ')}" unless available.include? value
21
22
  end),
22
23
  FastlaneCore::ConfigItem.new(key: :rollout,
@@ -111,7 +112,16 @@ module Supply
111
112
  optional: true,
112
113
  description: "Whether to skip uploading SCREENSHOTS",
113
114
  is_string: false,
114
- default_value: false)
115
+ default_value: false),
116
+ FastlaneCore::ConfigItem.new(key: :track_promote_to,
117
+ env_name: "SUPPLY_TRACK_PROMOTE_TO",
118
+ optional: true,
119
+ description: "The Track to promote to: #{valid_tracks.join(', ')}",
120
+ verify_block: proc do |value|
121
+ available = valid_tracks
122
+ UI.user_error! "Invalid value '#{value}', must be #{available.join(', ')}" unless available.include? value
123
+ end)
124
+
115
125
  ]
116
126
  end
117
127
  end
@@ -25,11 +25,21 @@ module Supply
25
25
 
26
26
  upload_binaries unless Supply.config[:skip_upload_apk]
27
27
 
28
+ promote_track if Supply.config[:track_promote_to]
29
+
28
30
  UI.message("Uploading all changes to Google Play...")
29
31
  client.commit_current_edit!
30
32
  UI.success("Successfully finished the upload to Google Play")
31
33
  end
32
34
 
35
+ def promote_track
36
+ version_codes = client.track_version_codes(Supply.config[:track])
37
+ client.update_track(Supply.config[:track], 1.0, nil)
38
+ version_codes.each do |apk_version_code|
39
+ client.update_track(Supply.config[:track_promote_to], 1.0, apk_version_code)
40
+ end
41
+ end
42
+
33
43
  def upload_changelogs(language)
34
44
  client.apks_version_codes.each do |apk_version_code|
35
45
  upload_changelog(language, apk_version_code)
@@ -1,4 +1,4 @@
1
1
  module Supply
2
- VERSION = "0.6.2".freeze
2
+ VERSION = "0.7.0".freeze
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.6.2
4
+ version: 0.7.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-04-06 00:00:00.000000000 Z
11
+ date: 2016-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.40.0
33
+ version: 0.43.4
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.0
40
+ version: 0.43.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: credentials_manager
43
43
  requirement: !ruby/object:Gem::Requirement