fastlane-plugin-google_play_versions 0.1.0 → 0.2.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
  SHA256:
3
- metadata.gz: 2e5f14a8068ab6280b477950d5e497760f9a212d62c5d638da91fd79a3911999
4
- data.tar.gz: 9f0048fb0832fc7b65728cc9734e653f483dfeeeb25e8664cc34f992566dee43
3
+ metadata.gz: 33a7d6ed0421b1dc480f7c106753414e923067d35733f0b6739728f706588b0a
4
+ data.tar.gz: f9a7b3cec012dd8f46898835392b3b0c2e9c35134bb62500d57eef161ca19044
5
5
  SHA512:
6
- metadata.gz: 474a7c4b51e83937d998285d57fccd14b183b6ef11ab87898f82e90176073d2ae091de7888cc4ca5fcecdabc3d8b5a81712803f88f7e2828fd26a792fdcb3d32
7
- data.tar.gz: 6adb4fec4c440177f208c773c1076c82233923529c315966bc21cfa9945f20b2dbc2f28bca253606bfec72c672feaa8700cf1cebec4eeb07c0084bde8668109e
6
+ metadata.gz: 4dfb29a8029918a26edeff035604f1c66bc33267a5b7a4f6b0dda287b557d376d4f93a49abf7bbb05fe8e88ccd8a2e78e1c5caee28bc7e5d9ebb141cbf9c8655
7
+ data.tar.gz: 2126bdb07102b7c8c8977922e28310aa9859aacc3ed9f02eafade369c44a9215e6921bd304b2ebe5204477c480821c8618b83dbbeab9a778a7283735a9a59a35
data/README.md CHANGED
@@ -24,14 +24,23 @@ lane :release do
24
24
  end
25
25
  ```
26
26
 
27
- The action will use Supply under the hood to connect to the Play Store and lookup the highest build version code for the specified track.
27
+ The action uses [Supply](https://docs.fastlane.tools/actions/supply/) to connect to the Play Store and lookup the highest app bundle version code for the track
28
+ parameter. It also checks app bundles from archived or halted releases, allowing your workflows to avoid getting a Play Store API error when uploading an app bundle with a version code that already exists. This is not supported by [`google_play_track_version_codes()`](https://docs.fastlane.tools/actions/google_play_track_version_codes/), which only retrieves the version codes on a track.
28
29
 
29
30
  ### Available options
30
31
 
31
- | Option | Description | Default |
32
- |----------------|-----------------------------------------------------|-----------|
33
- | `package_name` | The package name of the application to use | current directory |
34
- | `track` | The track of the application to use. The default available tracks are: production, beta, alpha, internal | `production` |
32
+ This action supports a subset of Supply's available options.
33
+
34
+ | Option | Description | Default |
35
+ |-----------------|-----------------------------------------------------|-----------|
36
+ | `package_name` | The package name of the application to use | current directory |
37
+ | `track` | The track of the application to use. The default available tracks are: production, beta, alpha, internal | `production` |
38
+ | `json_key` | The path to a file containing service account JSON, used to authenticate with Google | * |
39
+ | `json_key_data` | The raw service account JSON data used to authenticate with Google | * |
40
+ | `root_url` | Root URL for the Google Play API. The provided URL will be used for API calls in place of https://www.googleapis.com/ | * |
41
+ | `timeout` | Timeout for read, open, and send (in seconds) | 300 |
42
+
43
+ *\* = default value is dependent on the user's system*
35
44
 
36
45
  Run `bundle exec fastlane action google_play_versions` for details.
37
46
 
@@ -43,3 +52,8 @@ Run `bundle exec fastlane action google_play_versions` for details.
43
52
  ## Issues and Contributions
44
53
 
45
54
  Please create a GitHub issue if you run into a problem or have a feature request. Pull requests are always welcome.
55
+
56
+ ## References
57
+
58
+ - https://developer.android.com/google/play/publishing/multiple-apks#VersionCodes
59
+ - https://developer.android.com/build/configure-apk-splits
@@ -22,13 +22,25 @@ module Fastlane
22
22
  track: params[:track]
23
23
  )
24
24
  aab_version_codes = Helper::GooglePlayVersionsHelper.aab_version_codes(config)
25
- version_code = (track_version_codes + aab_version_codes).max
25
+ if aab_version_codes.empty? && track_version_codes.empty?
26
+ UI.important("Could not find any app bundles with version codes on the '#{params[:track]}' track")
27
+ return 0
28
+ end
29
+ max_track_version_code = track_version_codes.max
30
+ if max_track_version_code.to_s.size >= 4
31
+ related_aab_version_codes = aab_version_codes.select do |version_code|
32
+ version_code.to_s[0..4].to_i == max_track_version_code.to_s[0..4].to_i
33
+ end
34
+ version_code = (track_version_codes + related_aab_version_codes).max
35
+ else
36
+ version_code = (track_version_codes + aab_version_codes).max
37
+ end
26
38
  UI.success("Found '#{version_code}' as the latest version code on the '#{params[:track]}' track")
27
39
  version_code
28
40
  end
29
41
 
30
42
  def self.description
31
- "Fetch the most recent build version code from a Play Store track from within Fastlane."
43
+ "Fetch the most recent version code from a Play Store track from within Fastlane."
32
44
  end
33
45
 
34
46
  def self.details
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Fastlane
4
4
  module GooglePlayVersions
5
- VERSION = "0.1.0"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-google_play_versions
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
  - Nuno Pinge