fastlane-plugin-cordova 0.3.1 → 0.3.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
  SHA1:
3
- metadata.gz: 2c95eb04a16e53feacd857e615c98ad3b566d876
4
- data.tar.gz: 91f32216196a61abe7739b50a2430aca4b97f68d
3
+ metadata.gz: 3c4b8b3aa4a5ab87fbcab963999ae255a742f6f3
4
+ data.tar.gz: bb4ad458233c045c1d9639c427102338f8caec30
5
5
  SHA512:
6
- metadata.gz: 97b353ccc5493b4655b3c24e1db57c06f10f924d05a6b90d479d640fdfb3935c1486564bbe387bf823d1a36d5947ae4f75d77f5cdcde0744a7ce6663d385e23e
7
- data.tar.gz: d162fc0ce30db29877708ce28a3ed9390e9905d78ff4590165f4b5775593b099357ef3012d3eef6231d844f2a835b9d9b9c5cea1256a265985c2e6fd28462908
6
+ metadata.gz: d682caa7e5f271e2ce872d75781fcbebd4fe05a6671fbdfa4d5b4e1f640f7b5a9ae84d31a61a19e53db394d1ab9e6b805610fb15c0680a719c00fc6853a9529d
7
+ data.tar.gz: 29b5426e5cd48381ae77c6b4cce6b04be17db851a8a663930b9e9651a8d55718c639c3f74f3f111e237c65f649bb0534c46e5c58e6508def615eeefe932ed85b
@@ -18,7 +18,6 @@ module Fastlane
18
18
  type: 'packageType',
19
19
  team_id: 'developmentTeam',
20
20
  provisioning_profile: 'provisioningProfile',
21
- build_number: 'CFBundleVersion'
22
21
  }
23
22
 
24
23
  def self.get_platform_args(params, args_map)
@@ -76,7 +75,22 @@ module Fastlane
76
75
  android_args = self.get_android_args(params) if params[:platform].to_s == 'android'
77
76
  ios_args = self.get_ios_args(params) if params[:platform].to_s == 'ios'
78
77
 
79
- sh "cordova build #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
78
+ if params[:cordova_prepare]
79
+ sh "cordova prepare #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
80
+ end
81
+
82
+ if params[:platform].to_s == 'ios' && !params[:build_number].to_s.empty?
83
+ cf_bundle_version = params[:build_number].to_s
84
+ Actions::UpdateInfoPlistAction.run(
85
+ xcodeproj: "./platforms/ios/#{self.get_app_name}.xcodeproj",
86
+ plist_path: "#{self.get_app_name}/#{self.get_app_name}-Info.plist",
87
+ block: lambda { |plist|
88
+ plist['CFBundleVersion'] = cf_bundle_version
89
+ }
90
+ )
91
+ end
92
+
93
+ sh "cordova compile #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
80
94
  end
81
95
 
82
96
  def self.set_build_paths(is_release)
@@ -202,6 +216,13 @@ module Fastlane
202
216
  description: "Specifies whether to browserify build or not",
203
217
  default_value: false,
204
218
  is_string: false
219
+ ),
220
+ FastlaneCore::ConfigItem.new(
221
+ key: :cordova_prepare,
222
+ env_name: "CORDOVA_PREPARE",
223
+ description: "Specifies whether to run `cordova prepare` before building",
224
+ default_value: true,
225
+ is_string: false
205
226
  )
206
227
  ]
207
228
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Cordova
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.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: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Almouro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-09 00:00:00.000000000 Z
11
+ date: 2017-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry