fastlane-plugin-get_new_build_number 0.2.10 → 0.3.0

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: d985fea4e6701674f2865c8bc637eeb6402af1f907ba8970304f008043f27e34
4
- data.tar.gz: e5be6e48350b6becd79e9aacd89a1ecd5103d7af96362972daee76155bcc7b8e
3
+ metadata.gz: 59c75779af0cbf202c46dc2f3827c5f8baebbb702e3f4c2e2b76b1b861d86428
4
+ data.tar.gz: a41aa4f1c71626090531cecea1cd73a5c35bf7088dff749ab1a1d89e77cc41f1
5
5
  SHA512:
6
- metadata.gz: e55d368403e1dd2a3881101e0bdfe077d06f07106b43b4d31f0d5f966a57a3c3e6689c3f375df88e1553567fdd66ef6636773f8a1bb346666f59540936b374b8
7
- data.tar.gz: bf22234e849fd65411a8c115e164d0039ef6d4e364b3c5c5cf2aa170523f196e16331e1f54996b19f3e8bd78a95aaf1cf1a84303c6450e92a520412223c3853b
6
+ metadata.gz: 258bad94af8c697c660f40fe4dd25d1201bb4cdf806cf268bbcebd9b6be6757622873358ae9e8fae6c17048a2fff5118c8a73ad05495b42c3f701b70eebb2fa9
7
+ data.tar.gz: a51f26aa16e537c9a295092022cc6d5c6515eff0a69b505515553861c907bdef28db5223613da4b7a7541af112a975f496fccb8c0f441fe20175652f6222268b
@@ -7,22 +7,20 @@ module Fastlane
7
7
  module Actions
8
8
  class GetNewBuildNumberAction < Action
9
9
  def self.run(params)
10
- UI.message("bundle_identifier: #{params[:bundle_identifier]}")
11
- UI.message("package_name: #{params[:package_name]}")
12
- UI.message("google_play_json_key_path: #{params[:google_play_json_key_path]}")
13
- UI.message("firebase_json_key_path: #{params[:firebase_json_key_path]}")
14
- UI.message("firebase_app_ios: #{params[:firebase_app_ios]}")
15
- UI.message("firebase_app_android: #{params[:firebase_app_android]}")
10
+ FastlaneCore::PrintTable.print_values(
11
+ config: params,
12
+ title: "Summary for get_new_build_number #{GetNewBuildNumber::VERSION}"
13
+ )
16
14
 
17
- file = "#{Dir.tmpdir}/latest_build_number.txt"
18
- UI.message("Temporary file location: #{file}")
15
+ file = File.join(Dir.tmpdir, "latest_build_number.txt")
16
+ UI.message("Looking for temporary build number file at: #{file}")
19
17
 
20
18
  if File.exist?(file)
21
- UI.success("File with new number file exists. Reading build number from it...")
19
+ UI.message("Found temporary build number file")
22
20
  latest_build_number = File.read(file).to_i
23
21
  else
24
22
  UI.important("File with new build number does not exist. New build number will be " \
25
- "retrieved and temporary file with it will be created.")
23
+ "retrieved and temporary file with it will be created.")
26
24
  latest_build_number = Helper::GetNewBuildNumberHelper.get_latest_build_number(
27
25
  bundle_identifier: params[:bundle_identifier],
28
26
  package_name: params[:package_name],
@@ -39,14 +37,14 @@ module Fastlane
39
37
  end
40
38
  end
41
39
 
42
- UI.success("Latest build number: #{latest_build_number}")
40
+ UI.message("Latest build number: #{latest_build_number}")
43
41
 
44
42
  if latest_build_number.kind_of?(Integer)
45
43
  new_latest_build_number = latest_build_number + 1
46
- UI.success("New build number: #{new_latest_build_number}")
44
+ UI.success("New build number (latest + 1): #{new_latest_build_number}")
47
45
  return new_latest_build_number
48
46
  else
49
- UI.error("Latest build number is not an Integer")
47
+ UI.error("Latest build number is not an Integer (#{latest_build_number})")
50
48
  return nil
51
49
 
52
50
  end
@@ -1,5 +1,4 @@
1
1
  require 'fastlane_core/ui/ui'
2
- require 'tmpdir'
3
2
 
4
3
  module Fastlane
5
4
  UI = FastlaneCore::UI unless Fastlane.const_defined?(:UI)
@@ -68,7 +67,7 @@ module Fastlane
68
67
  ].max
69
68
 
70
69
  UI.message("Latest build number (Google Play Store): #{google_play_build_number}")
71
-
70
+
72
71
  fad_build_number_ios = 0
73
72
  begin
74
73
  unless firebase_app_ios.nil?
@@ -116,18 +115,16 @@ module Fastlane
116
115
  # Returns the latest build number ("version code", in Android terminology)
117
116
  # for the given Google Play track.
118
117
  def self.get_google_play_build_number(track:, package_name:, json_key:)
119
- begin
120
- codes = Fastlane::Actions::GooglePlayTrackVersionCodesAction.run(
121
- track:,
122
- package_name:,
123
- json_key:
124
- )
118
+ codes = Fastlane::Actions::GooglePlayTrackVersionCodesAction.run(
119
+ track:,
120
+ package_name:,
121
+ json_key:
122
+ )
125
123
 
126
- return codes.max
127
- rescue StandardError
128
- UI.message("No build numbers found for track #{track} (Google Play Store)")
129
- return 0
130
- end
124
+ return codes.max
125
+ rescue StandardError
126
+ UI.message("No build numbers found for track #{track} (Google Play Store)")
127
+ return 0
131
128
  end
132
129
 
133
130
  # TODO: Don't duplicate so much code
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GetNewBuildNumber
3
- VERSION = "0.2.10"
3
+ VERSION = "0.3.0"
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.10
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartek Pacia
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-01 00:00:00.000000000 Z
11
+ date: 2023-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.206.2
33
+ version: 2.208.0
34
34
  type: :development
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: 2.206.2
40
+ version: 2.208.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 1.12.1
103
+ version: 1.32.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 1.12.1
110
+ version: 1.32.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubocop-performance
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +164,7 @@ dependencies:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
- description:
167
+ description:
168
168
  email: barpac02@gmail.com
169
169
  executables: []
170
170
  extensions: []
@@ -182,7 +182,7 @@ licenses:
182
182
  - MIT
183
183
  metadata:
184
184
  rubygems_mfa_required: 'true'
185
- post_install_message:
185
+ post_install_message:
186
186
  rdoc_options: []
187
187
  require_paths:
188
188
  - lib
@@ -197,8 +197,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0'
199
199
  requirements: []
200
- rubygems_version: 3.3.7
201
- signing_key:
200
+ rubygems_version: 3.4.6
201
+ signing_key:
202
202
  specification_version: 4
203
- summary: Retrieves the new build number for your app.
203
+ summary: Retrieves the new build number for your mobile app.
204
204
  test_files: []