fastlane-plugin-auto_version_name 0.2.0 → 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: f7c09abca8957f803d8c78260e14c3e7f7ce80a4482e34200a3c17e09cd55086
4
- data.tar.gz: 9b13c63d00aae7a350c1372d4748a392d53faca2cd30424c9c0272208e3ed74e
3
+ metadata.gz: ddbe148cf43cc5de663b5e174abbd4fa41fc7b16de9f60309b4881f876830d44
4
+ data.tar.gz: b66c2f4364b1215ff620c0153d2685c4ccdbdb738655499d68801860c5c6bb82
5
5
  SHA512:
6
- metadata.gz: 63e01ee2984bc620921501ef862a4c8b8ef58ee6ae04c6b38588a53b5aa7d1b76af4ee643f530585d43bbb2ee4fa506bf1ce4b97d5a66a5dd9460a23ae5c58ae
7
- data.tar.gz: 1c3e91b93bd0a39dbc83935b0c8d0734fed76f3036789eb6e2bae11b21db0126ea2eb2d9ef17ed72f9d484b3a84eba92b6965ff2e180c9c62b0fabf2bb2c5bf0
6
+ metadata.gz: d130c38d1751918fd20b07310a3920199690dfe5be85833f6aaa4ea9a7352dc0c159b0297f933d745af9380366b5c9b49d41af4c7d3fa857c30d734a19e1e473
7
+ data.tar.gz: ea4b1f6e824c735be2503c7e05cad6974eec9c38667ef645cab0d5d83b0d77f2e0a1a58dd183c42247a138185b35307cd79b23c9ff374a4795e023474e9e06b5
@@ -7,6 +7,7 @@ module Fastlane
7
7
  def self.run(params)
8
8
  # INITIALIZE
9
9
  branch = Actions.git_branch()
10
+ default_platform = lane_context[SharedValues::DEFAULT_PLATFORM]
10
11
  last_commit_message = Actions.last_git_commit_message()
11
12
  final_version_array = []
12
13
  final_version_string = ""
@@ -62,6 +63,21 @@ module Fastlane
62
63
  rescue => exception
63
64
  puts exception
64
65
  ios_version_string = minimal_version_string
66
+ ensure
67
+ if (default_platform == :ios)
68
+ platform = Spaceship::ConnectAPI::Platform.map("ios")
69
+ app = Spaceship::ConnectAPI::App.find(params[:ios_app_identifier])
70
+ latest_version = app.get_latest_app_store_version(platform: platform)
71
+
72
+ v_state = latest_version.app_store_state
73
+ v_name = latest_version.version_string
74
+ v_name_array = v_name.split('.').map { |value| value.to_i }
75
+
76
+ if ((v_state == "WAITING_FOR_REVIEW" || v_state == "IN_REVIEW") && v_name_array.last > 0)
77
+ UI.error "App Store Connect is processing a hotfix! Version: #{v_name}; Status: #{v_state}"
78
+ exit(false)
79
+ end
80
+ end
65
81
  end
66
82
 
67
83
  # ANDROID
@@ -80,9 +96,11 @@ module Fastlane
80
96
 
81
97
  greater_version_string = get_greater_version(
82
98
  minimal_version_string, ios_version_string, android_version_string
83
- )
99
+ )
100
+
101
+ are_all_equal = [minimal_version_string, ios_version_string, android_version_string].uniq.size <= 1
84
102
 
85
- if (!has_any_live_version || greater_version_string == minimal_version_string)
103
+ if (!has_any_live_version || (!are_all_equal && greater_version_string == minimal_version_string))
86
104
  return minimal_version_string
87
105
  end
88
106
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AutoVersionName
3
- VERSION = "0.2.0"
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-auto_version_name
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - gileadeteixeira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-28 00:00:00.000000000 Z
11
+ date: 2024-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
183
  requirements: []
184
- rubygems_version: 3.0.9
184
+ rubygems_version: 3.3.25
185
185
  signing_key:
186
186
  specification_version: 4
187
187
  summary: Generate incremented version names from Apple and Google stores