fastlane-plugin-get_new_build_number 0.2.11 → 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
  SHA256:
3
- metadata.gz: fa93f1747bbb5a4668864b7868709b8855bc848372c788366e1ed90018270580
4
- data.tar.gz: c34b39bcd247ba004d2ebd2457faf635c4f25c140e5edecb2f252df0250777bc
3
+ metadata.gz: 136ba0ca9e97839764c390c039592c8004fa1ae7014642d8f70a629aee5c7e27
4
+ data.tar.gz: f28aa9e626e37cc10d4b4572ff38368387c972f8b4cfd58de7299628143e701a
5
5
  SHA512:
6
- metadata.gz: fb2648136bde63f2b96bb5f2d2fb8cadc96549cc5377c3daca4e041927d17f0f4d226a6d48f86ee41c49c4a56286b4056c880feb66702fc8ca68c4cd27f6126d
7
- data.tar.gz: 0603a62cae3459832816fa679bb83d4b4c54f7ab0f78b3ac9d8d5c4c7fa9c610ce984a37fc07d018416f094dbeb0f6305f5649b8ab785aac9316d08f301929bf
6
+ metadata.gz: b1f0e865425320aa903fb30bb2a711934ffc935b0ad51b7cb73d9d6bcf0650213377ff99a605a70a0d2c56928c93a44a3184d6b146eb9c233c89128b51ea4fca
7
+ data.tar.gz: 89306f818591ed0610cbefcc71663acc6d69b8e7c27e529453c91e43f787c62765ee5e9a0bdf3d12231bc22cea54f1e760f5b73df43453b2438bd1165a34300b
@@ -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)
@@ -38,25 +37,25 @@ module Fastlane
38
37
 
39
38
  google_play_build_number_prod = get_google_play_build_number(
40
39
  track: "production",
41
- package_name:,
40
+ package_name: package_name,
42
41
  json_key: google_play_json_key_path
43
42
  )
44
43
 
45
44
  google_play_build_number_beta = get_google_play_build_number(
46
45
  track: "beta",
47
- package_name:,
46
+ package_name: package_name,
48
47
  json_key: google_play_json_key_path
49
48
  )
50
49
 
51
50
  google_play_build_number_alpha = get_google_play_build_number(
52
51
  track: "alpha",
53
- package_name:,
52
+ package_name: package_name,
54
53
  json_key: google_play_json_key_path
55
54
  )
56
55
 
57
56
  google_play_build_number_internal = get_google_play_build_number(
58
57
  track: "internal",
59
- package_name:,
58
+ package_name: package_name,
60
59
  json_key: google_play_json_key_path
61
60
  )
62
61
 
@@ -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: track,
120
+ package_name: package_name,
121
+ json_key: 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.1"
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.1
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: 2024-03-25 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.208.0
33
+ version: 2.219.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.208.0
40
+ version: 2.219.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.32.0
103
+ version: 1.62.1
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.32.0
110
+ version: 1.62.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubocop-performance
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop-rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: rubocop-require_tools
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -190,14 +204,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
190
204
  requirements:
191
205
  - - ">="
192
206
  - !ruby/object:Gem::Version
193
- version: '3.1'
207
+ version: '3.0'
194
208
  required_rubygems_version: !ruby/object:Gem::Requirement
195
209
  requirements:
196
210
  - - ">="
197
211
  - !ruby/object:Gem::Version
198
212
  version: '0'
199
213
  requirements: []
200
- rubygems_version: 3.3.7
214
+ rubygems_version: 3.5.3
201
215
  signing_key:
202
216
  specification_version: 4
203
217
  summary: Retrieves the new build number for your mobile app.