supply 0.3.0 → 0.3.1

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: 4f83fc4e36d718344106107075628c0ec7d2132e
4
- data.tar.gz: 2c2be0e69074bf70feabbef9088e19cbdb0bbd13
3
+ metadata.gz: cf1ce6eea2f83d47a47cc8b7e4f8a93ad41f81ba
4
+ data.tar.gz: 0a8474cc4ac5867ce6175c63d2bbe174239e5d47
5
5
  SHA512:
6
- metadata.gz: 00b5fb9d566f858423e3a82e2f257f85a1cb3bb1436f8f4f6e94a1c9dd54315f15d658ed8e3358e24684756c826d968bee7668e1c61b4ac995c9170b5f797cc7
7
- data.tar.gz: 88439d20a9115470efac14d99bb5da5cbcfadc7a2cebc66f20f847972cc290c9c71156752f8467fecc9e6a7dfc0abf4113f4ae3b9b4afe31adc1c5cd56fe6c9b
6
+ metadata.gz: bf60276da8a2e62f38bc30c035d340b48d612d6a661f5d4fa8c4403d37cf88d439e86c394947ffd01e1c4a0540f4abaae5383b515fe421bc3b6e4d6eca3fb246
7
+ data.tar.gz: 02da6a2b8811fa77cab2a735c16ecc82ce4f4c70d4500ead0dfb8af971a35dfca12554c5b34dd60c8392601108af2cc77d067a70ab2c970d2d7938091a0dbd16
data/README.md CHANGED
@@ -29,14 +29,14 @@
29
29
  supply
30
30
  ============
31
31
 
32
- [![Twitter: @KauseFx](https://img.shields.io/badge/contact-@KrauseFx-blue.svg?style=flat)](https://twitter.com/KrauseFx)
33
- [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/KrauseFx/supply/blob/master/LICENSE)
32
+ [![Twitter: @FastlaneTools](https://img.shields.io/badge/contact-@FastlaneTools-blue.svg?style=flat)](https://twitter.com/FastlaneTools)
33
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/supply/blob/master/LICENSE)
34
34
  [![Gem](https://img.shields.io/gem/v/supply.svg?style=flat)](http://rubygems.org/gems/supply)
35
35
  [![Build Status](https://img.shields.io/travis/fastlane/supply/master.svg?style=flat)](https://travis-ci.org/KrauseFx/supply)
36
36
 
37
37
  ###### Command line tool for updating Android apps and their metadata on the Google Play Store
38
38
 
39
- Get in contact with the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)
39
+ Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.com/FastlaneTools)
40
40
 
41
41
 
42
42
  -------
@@ -116,7 +116,7 @@ supply --apk path/app.apk --track rollout --rollout 0.5
116
116
 
117
117
  ## Images and Screenshots
118
118
 
119
- 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`.
119
+ 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_description.txt`.
120
120
 
121
121
  Here you can supply images with the following file names (extension can be png, jpg or jpeg):
122
122
 
@@ -176,6 +176,9 @@ You can add changelog files under the `changelogs/` directory for each locale. T
176
176
  # Need help?
177
177
  Please submit an issue on GitHub and provide information about your setup
178
178
 
179
+ # Code of Conduct
180
+ Help us keep `supply` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/code-of-conduct).
181
+
179
182
  ## License
180
183
 
181
184
  This project is licensed under the terms of the MIT license. See the LICENSE file.
@@ -27,6 +27,8 @@ module Supply
27
27
 
28
28
  always_trace!
29
29
 
30
+ global_option('--verbose') { $verbose = true }
31
+
30
32
  command :run do |c|
31
33
  c.syntax = 'supply'
32
34
  c.description = 'Run a deploy process'
@@ -32,10 +32,7 @@ module Supply
32
32
  short_option: "-m",
33
33
  optional: true,
34
34
  description: "Path to the directory containing the metadata files",
35
- default_value: (Dir["./fastlane/metadata/android"] + Dir["./metadata"]).first,
36
- verify_block: proc do |value|
37
- raise "Could not find folder".red unless File.directory? value
38
- end),
35
+ default_value: (Dir["./fastlane/metadata/android"] + Dir["./metadata"]).first),
39
36
  FastlaneCore::ConfigItem.new(key: :key,
40
37
  env_name: "SUPPLY_KEY",
41
38
  short_option: "-k",
data/lib/supply/setup.rb CHANGED
@@ -42,7 +42,11 @@ module Supply
42
42
  require 'net/http'
43
43
 
44
44
  IMAGES_TYPES.each do |image_type|
45
- next if ['featureGraphic'].include?(image_type) # we don't get all files in full resolution :(
45
+ if ['featureGraphic'].include?(image_type)
46
+ # we don't get all files in full resolution :(
47
+ Helper.log.info "Due to the limit of the Google Play API `supply` can't download your existing feature graphics..."
48
+ next
49
+ end
46
50
 
47
51
  begin
48
52
  Helper.log.info "Downloading #{image_type} for #{listing.language}..."
@@ -8,6 +8,8 @@ module Supply
8
8
  raise "No local metadata found, make sure to run `supply init` to setup supply".red unless metadata_path || Supply.config[:apk]
9
9
 
10
10
  if metadata_path
11
+ raise "Could not find folder".red unless File.directory? metadata_path
12
+
11
13
  Dir.foreach(metadata_path) do |language|
12
14
  next if language.start_with?('.') # e.g. . or .. or hidden folders
13
15
 
@@ -16,6 +18,7 @@ module Supply
16
18
  upload_metadata(language, listing) unless Supply.config[:skip_upload_metadata]
17
19
  upload_images(language) unless Supply.config[:skip_upload_images]
18
20
  upload_screenshots(language) unless Supply.config[:skip_upload_screenshots]
21
+ upload_changelogs(language) unless Supply.config[:skip_upload_metadata]
19
22
  end
20
23
  end
21
24
 
@@ -26,6 +29,21 @@ module Supply
26
29
  Helper.log.info "Successfully finished the upload to Google Play".green
27
30
  end
28
31
 
32
+ def upload_changelogs(language)
33
+ client.apks_version_codes.each do |apk_version_code|
34
+ upload_changelog(language, apk_version_code)
35
+ end
36
+ end
37
+
38
+ def upload_changelog(language, apk_version_code)
39
+ path = File.join(metadata_path, language, Supply::CHANGELOGS_FOLDER_NAME, "#{apk_version_code}.txt")
40
+ if File.exist?(path)
41
+ Helper.log.info "Updating changelog for code version '#{apk_version_code}' and language '#{language}'..."
42
+ apk_listing = ApkListing.new(File.read(path), language, apk_version_code)
43
+ client.update_apk_listing_for_language(apk_listing)
44
+ end
45
+ end
46
+
29
47
  def upload_metadata(language, listing)
30
48
  Helper.log.info "Loading metadata for language '#{language}'..."
31
49
 
@@ -81,13 +99,7 @@ module Supply
81
99
  if metadata_path
82
100
  Dir.foreach(metadata_path) do |language|
83
101
  next if language.start_with?('.') # e.g. . or .. or hidden folders
84
-
85
- path = File.join(metadata_path, language, Supply::CHANGELOGS_FOLDER_NAME, "#{apk_version_code}.txt")
86
- if File.exist?(path)
87
- Helper.log.info "Updating changelog for code version '#{apk_version_code}' and language '#{language}'..."
88
- apk_listing = ApkListing.new(File.read(path), language, apk_version_code)
89
- client.update_apk_listing_for_language(apk_listing)
90
- end
102
+ upload_changelog(language, apk_version_code)
91
103
  end
92
104
  end
93
105
 
@@ -1,4 +1,4 @@
1
1
  module Supply
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1".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.3.0
4
+ version: 0.3.1
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-01-11 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0.34'
173
+ version: 0.35.1
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '0.34'
180
+ version: 0.35.1
181
181
  description: Command line tool for updating Android apps and their metadata on the
182
182
  Google Play Store
183
183
  email:
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  version: '0'
220
220
  requirements: []
221
221
  rubyforge_project:
222
- rubygems_version: 2.2.2
222
+ rubygems_version: 2.4.5.1
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: Command line tool for updating Android apps and their metadata on the Google