fastlane-plugin-get_new_build_number 0.2.11 → 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: fa93f1747bbb5a4668864b7868709b8855bc848372c788366e1ed90018270580
4
- data.tar.gz: c34b39bcd247ba004d2ebd2457faf635c4f25c140e5edecb2f252df0250777bc
3
+ metadata.gz: 59c75779af0cbf202c46dc2f3827c5f8baebbb702e3f4c2e2b76b1b861d86428
4
+ data.tar.gz: a41aa4f1c71626090531cecea1cd73a5c35bf7088dff749ab1a1d89e77cc41f1
5
5
  SHA512:
6
- metadata.gz: fb2648136bde63f2b96bb5f2d2fb8cadc96549cc5377c3daca4e041927d17f0f4d226a6d48f86ee41c49c4a56286b4056c880feb66702fc8ca68c4cd27f6126d
7
- data.tar.gz: 0603a62cae3459832816fa679bb83d4b4c54f7ab0f78b3ac9d8d5c4c7fa9c610ce984a37fc07d018416f094dbeb0f6305f5649b8ab785aac9316d08f301929bf
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.11"
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.11
4
+ version: 0.3.0
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-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
@@ -197,7 +197,7 @@ 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
200
+ rubygems_version: 3.4.6
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Retrieves the new build number for your mobile app.