fastlane-plugin-cordova 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6a4b5b48aa28034b00f28805ce38d774482cb0b1395276e2ca2f41e1be8cbb8
4
- data.tar.gz: e19f9770b313b16898a2fcfd82f2fbd3c1bed883b1f7c98a4b85582b2ff6b85f
3
+ metadata.gz: d52fb1a54180a3d41cbe389df9c680280d9b7ab47321db121a496a214a324d47
4
+ data.tar.gz: 1b3735a564b445227be2727bd9fbcce560231df67f66519ef503613dda36b15c
5
5
  SHA512:
6
- metadata.gz: 29793953c8d3ba76fced81de00c853cd9b7f2627b4f535fccc77c83d8930a60ca08d61cbb7095d10d4f3c09494f678011f09375f77792da91465d5cccf764f0f
7
- data.tar.gz: d2736e308f3da7e4cd4586c3a61717a711fadf50bd358eb6adbbb903baa61996775e6455cdab1fbe7db91cfd754d90a9d8d5c6f6328e0061448d3cfd336fd9d1
6
+ metadata.gz: 43ab3d3bc03ebd87627d6ccd1938c0882bb5192df86da1a8143bb3bbee2e3a56f2454594890bbd8938b27981638138771eeb71f48bb291df9abab0220b1df0a8
7
+ data.tar.gz: 47259c49e981c2913e81b9165b36ed93b243937a0abf31120d5c1412b555044940cefc340dd06103737bca0bf22f47795ff46f2b5f8a1ca5a1ef5c9fa60d992b
@@ -116,9 +116,31 @@ module Fastlane
116
116
  sh "npx --no-install cordova compile #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
117
117
  end
118
118
 
119
- def self.set_build_paths(is_release)
119
+ # @param [String] platforms_output The output from running +cordova platform ls+.
120
+ # @return [true] if the platforms_output indicates Cordova iOS version 7.0.0 or greater is installed
121
+ def self.output_has_ios_7_or_greater(platforms_output)
122
+ # Extract the Cordova iOS version by searching for a string like "ios 7.0.0"
123
+ platforms_regex = /^.*ios\s(\d+).\d+.\d+/
124
+ match_data = platforms_output.match(platforms_regex)
125
+ if match_data != nil && match_data.size() > 1
126
+ ios_major_version = match_data[1].to_i
127
+ return ios_major_version >= 7
128
+ end
129
+ return false
130
+ end
131
+
132
+ # @return [true] if Cordova iOS version 7.0.0 or greater is installed
133
+ def self.using_ios_7_or_greater(params)
134
+ if params[:platform].to_s != 'ios'
135
+ return false
136
+ end
137
+ platforms_output = sh "npx --no-install cordova platform ls"
138
+ return self.output_has_ios_7_or_greater(platforms_output)
139
+ end
140
+
141
+ def self.set_build_paths(params)
120
142
  app_name = self.get_app_name()
121
- build_type = is_release ? 'release' : 'debug'
143
+ build_type = params[:release] ? 'release' : 'debug'
122
144
 
123
145
  # Update the build path accordingly if Android is being
124
146
  # built as an Android Application Bundle.
@@ -126,13 +148,14 @@ module Fastlane
126
148
  android_package_extension = android_package_type == 'bundle' ? '.aab' : '.apk'
127
149
 
128
150
  ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'] = "./platforms/android/app/build/outputs/#{android_package_type}/#{build_type}/app-#{build_type}#{android_package_extension}"
129
- ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'] = "./platforms/ios/build/device/#{app_name}.ipa"
151
+ ios_subdirectory = self.using_ios_7_or_greater(params) ? 'Release-iphoneos' : 'device'
152
+ ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'] = "./platforms/ios/build/#{ios_subdirectory}/#{app_name}.ipa"
130
153
  end
131
154
 
132
155
  def self.run(params)
133
156
  self.check_platform(params)
134
157
  self.build(params)
135
- self.set_build_paths(params[:release])
158
+ self.set_build_paths(params)
136
159
  end
137
160
 
138
161
  #####################################################
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Cordova
3
- VERSION = "3.1.0"
3
+ VERSION = "3.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-cordova
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Almouro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-28 00:00:00.000000000 Z
11
+ date: 2023-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.1.2
128
+ rubygems_version: 3.3.7
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Build your Cordova app