fastlane-plugin-get_new_build_number 0.2.1 → 0.2.4

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
  SHA256:
3
- metadata.gz: a8e2528a341eb84b6b0c9ab295e585a60163a260ceda14d74a8cc31d16bcc5e3
4
- data.tar.gz: 72960821aa6f1b7a18da431ca3528d476307317d8309d6efee2b6301532fd6d4
3
+ metadata.gz: d55aa0088f0784624ae39f294ca8ff714d96f61bcfeda529c2c4a3dccd39162d
4
+ data.tar.gz: 4afd5c0d79d3c95c6410fa99af921bf9962ef956dd2ca12c9b907904195a38a7
5
5
  SHA512:
6
- metadata.gz: 126448527f46d456eceff761a9c2944d81c017d59f76e9f1d175c368521230e0330e16c18ab73e36a2dcb98781d9b28f866ff7615c5cd84d67374dcd52e331ea
7
- data.tar.gz: d5fe2a28a184e0ee80ad791070a08a412cbea9a97e1c31a5f404d4da256407d9fb6f386d812cc2b095b2df3b180c7402be160cdba9934df6df62b911dcc9c9c0
6
+ metadata.gz: 6c01f2e0e44f31f08d0978bcf4eb60ed5d9cf1f749d7018eb289fd0d7fdbc80041da17a20375bab6ef5ee80997d811f93c134536db6460d1d807d73bd9d8f386
7
+ data.tar.gz: c90534139f22c62b983c81d1ff9b227f4c4505e3d5098c994421aa385718713d6f273370d44cda038ded369d71e6c83f6fe2f28df8c7a187c28b49e5f181fa15
@@ -21,12 +21,13 @@ module Fastlane
21
21
  UI.success("File with new number file exists. Reading build number from it...")
22
22
  latest_build_number = File.read(file).to_i
23
23
  else
24
- UI.message("File with new build number does not exist. New build number will be "\
25
- "retrieved and temporary file with it will be created.")
24
+ UI.message("File with new build number does not exist. New build number will be " \
25
+ "retrieved and temporary file with it will be created.")
26
26
  latest_build_number = Helper::GetNewBuildNumberHelper.get_latest_build_number(
27
27
  bundle_identifier: params[:bundle_identifier],
28
28
  package_name: params[:package_name],
29
29
  google_play_json_key_path: params[:google_play_json_key_path],
30
+ app_store_initial_build_number: params[:app_store_initial_build_number],
30
31
  firebase_json_key_path: params[:firebase_json_key_path],
31
32
  firebase_app_ios: params[:firebase_app_ios],
32
33
  firebase_app_android: params[:firebase_app_android]
@@ -60,9 +61,9 @@ module Fastlane
60
61
  end
61
62
 
62
63
  def self.return_value
63
- "An integer representing a new build number. It's the latest build "\
64
- "number collected from all services (e.g App Store, Google Play, App "\
65
- "Center) plus 1."
64
+ "An integer representing a new build number. It's the latest build " \
65
+ "number collected from all services (e.g App Store, Google Play, App " \
66
+ "Center) plus 1."
66
67
  end
67
68
 
68
69
  def self.details
@@ -93,6 +94,13 @@ module Fastlane
93
94
  optional: true,
94
95
  type: String
95
96
  ),
97
+ FastlaneCore::ConfigItem.new(
98
+ key: :app_store_initial_build_number,
99
+ env_name: "APP_STORE_INITIAL_BUILD_NUMBER",
100
+ description: "Build number to use if there's nothing in App Store.",
101
+ optional: true,
102
+ type: String,
103
+ ),
96
104
  FastlaneCore::ConfigItem.new(
97
105
  key: :firebase_json_key_path,
98
106
  env_name: "FIREBASE_JSON_KEY_PATH",
@@ -10,6 +10,7 @@ module Fastlane
10
10
  bundle_identifier: nil,
11
11
  package_name: nil,
12
12
  google_play_json_key_path: nil,
13
+ app_store_initial_build_number: nil,
13
14
  firebase_json_key_path: nil,
14
15
  firebase_app_ios: nil,
15
16
  firebase_app_android: nil
@@ -28,7 +29,8 @@ module Fastlane
28
29
  unless bundle_identifier.nil?
29
30
  app_store_build_number = Fastlane::Actions::AppStoreBuildNumberAction.run(
30
31
  app_identifier: bundle_identifier,
31
- platform: "IOS"
32
+ platform: "IOS",
33
+ initial_build_number: app_store_initial_build_number || 1
32
34
  )
33
35
 
34
36
  UI.message("Latest build number (App Store): #{app_store_build_number}")
@@ -36,25 +38,25 @@ module Fastlane
36
38
 
37
39
  google_play_build_number_prod = get_google_play_build_number(
38
40
  track: "production",
39
- package_name: package_name,
41
+ package_name:,
40
42
  json_key: google_play_json_key_path
41
43
  )
42
44
 
43
45
  google_play_build_number_beta = get_google_play_build_number(
44
46
  track: "beta",
45
- package_name: package_name,
47
+ package_name:,
46
48
  json_key: google_play_json_key_path
47
49
  )
48
50
 
49
51
  google_play_build_number_alpha = get_google_play_build_number(
50
52
  track: "alpha",
51
- package_name: package_name,
53
+ package_name:,
52
54
  json_key: google_play_json_key_path
53
55
  )
54
56
 
55
57
  google_play_build_number_internal = get_google_play_build_number(
56
58
  track: "internal",
57
- package_name: package_name,
59
+ package_name:,
58
60
  json_key: google_play_json_key_path
59
61
  )
60
62
 
@@ -99,9 +101,9 @@ module Fastlane
99
101
  # for the given Google Play track.
100
102
  def self.get_google_play_build_number(track:, package_name:, json_key:)
101
103
  codes = Fastlane::Actions::GooglePlayTrackVersionCodesAction.run(
102
- track: track,
103
- package_name: package_name,
104
- json_key: json_key
104
+ track:,
105
+ package_name:,
106
+ json_key:
105
107
  )
106
108
 
107
109
  return codes.max
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GetNewBuildNumber
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-get_new_build_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartek Pacia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-16 00:00:00.000000000 Z
11
+ date: 2022-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -179,7 +179,8 @@ files:
179
179
  homepage: https://github.com/bartekpacia/fastlane-plugin-get_new_build_number
180
180
  licenses:
181
181
  - MIT
182
- metadata: {}
182
+ metadata:
183
+ rubygems_mfa_required: 'true'
183
184
  post_install_message:
184
185
  rdoc_options: []
185
186
  require_paths:
@@ -188,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
189
  requirements:
189
190
  - - ">="
190
191
  - !ruby/object:Gem::Version
191
- version: '2.5'
192
+ version: '3.1'
192
193
  required_rubygems_version: !ruby/object:Gem::Requirement
193
194
  requirements:
194
195
  - - ">="