fastlane-plugin-cordova 1.0.1 → 3.0.0

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
- SHA1:
3
- metadata.gz: 33b2941827c2c572a8200023baae74e14e12e6f4
4
- data.tar.gz: 0c7020beddba620ee44a645a0624b2e756a77d97
2
+ SHA256:
3
+ metadata.gz: 8e99de8a0b61971ce82e999b29ca6e69149bf4cfd9d10878bc12c567630afdef
4
+ data.tar.gz: 1ee12a3b5401561de12fe1c3dda8d995a2bc368df1c9cdac38f168bcc992a967
5
5
  SHA512:
6
- metadata.gz: 8b945078aeaa1b382fd71f6666b0352e858b73c49dc237f810a52bc97f78c4c78ce39ba2fbc3d89b4f664ce923a1e006ae00f9f0d39892a52d7af90410ac921f
7
- data.tar.gz: f6bd05bf69941f5e76bd4c37918895d3a18d45594adc72fd7673da24cbd2d26a94ca793c95e6a941a92709f23300245c58aa18e79ad7bf65a6e60f828b2aa8e5
6
+ metadata.gz: e134266eecc26bdbf6662cf9f08bd60d1316590b5eded1ea9f67cccd6fec5e45daf39d362fede2d9194137be2e7a703826b03f1f97e8b5358fa4e7004b9e204c
7
+ data.tar.gz: db4ef75db27170061b9fae83c90b2648d8c4014bee40f95aeea845cf6303f6e13c875bf7ff839f68dfa41b0ddbabd3cb61a484fda666bdd4a87e0aa55a73ce1a
data/README.md CHANGED
@@ -15,6 +15,8 @@ This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To ge
15
15
  fastlane add_plugin cordova
16
16
  ```
17
17
 
18
+ :warning: *If you're using a Cordova version below 7, you need to use version `1.0.1` of this plugin*
19
+
18
20
  Then you can integrate it into your Fastlane setup:
19
21
 
20
22
  ```ruby
@@ -77,6 +79,7 @@ Which will produce:
77
79
  | **device** | Build for device | CORDOVA_DEVICE | *true* |
78
80
  | **type** | This will determine what type of build is generated by Xcode. <br>Valid options are development, enterprise, adhoc, and appstore| CORDOVA_IOS_PACKAGE_TYPE | appstore |
79
81
  | **team_id** | The development team (Team ID) to use for code signing | CORDOVA_IOS_TEAM_ID | *28323HT* |
82
+ | **build_flag** | An array of Xcode buildFlag. Will be appended on compile command. | CORDOVA_IOS_BUILD_FLAG | [] |
80
83
  | **provisioning_profile** | GUID of the provisioning profile to be used for signing | CORDOVA_IOS_PROVISIONING_PROFILE | |
81
84
  | **keystore_path** | Path to the Keystore for Android | CORDOVA_ANDROID_KEYSTORE_PATH | |
82
85
  | **keystore_password** | Android Keystore password | CORDOVA_ANDROID_KEYSTORE_PASSWORD | |
@@ -87,6 +90,7 @@ Which will produce:
87
90
  | **browserify** | Specifies whether to browserify build or not | CORDOVA_BROWSERIFY | *false* |
88
91
  | **cordova_prepare** | Specifies whether to run `cordova prepare` before building | CORDOVA_PREPARE | *true* |
89
92
  | **cordova_no_fetch** | Specifies whether to run `cordova platform add` with `--nofetch` parameter | CORDOVA_NO_FETCH | *false* |
93
+ | **cordova_build_config_file** | Call `cordova compile` with `--buildConfig=<ConfigFile>` to specify build config file path | CORDOVA_BUILD_CONFIG_FILE | |
90
94
 
91
95
  ## Run tests for this plugin
92
96
 
@@ -20,14 +20,24 @@ module Fastlane
20
20
  type: 'packageType',
21
21
  team_id: 'developmentTeam',
22
22
  provisioning_profile: 'provisioningProfile',
23
+ build_flag: 'buildFlag'
23
24
  }
24
25
 
25
26
  def self.get_platform_args(params, args_map)
26
27
  platform_args = []
27
28
  args_map.each do |action_key, cli_param|
28
29
  param_value = params[action_key]
29
- unless param_value.to_s.empty?
30
- platform_args << "--#{cli_param}=#{Shellwords.escape(param_value)}"
30
+
31
+ if action_key.to_s == 'build_flag' && param_value.kind_of?(Array)
32
+ unless param_value.empty?
33
+ param_value.each do |flag|
34
+ platform_args << "--#{cli_param}=#{flag.shellescape}"
35
+ end
36
+ end
37
+ else
38
+ unless param_value.to_s.empty?
39
+ platform_args << "--#{cli_param}=#{Shellwords.escape(param_value)}"
40
+ end
31
41
  end
32
42
  end
33
43
 
@@ -63,9 +73,9 @@ module Fastlane
63
73
  platform = params[:platform]
64
74
  if platform && !File.directory?("./platforms/#{platform}")
65
75
  if params[:cordova_no_fetch]
66
- sh "cordova platform add #{platform} --nofetch"
76
+ sh "npx --no-install cordova platform add #{platform} --nofetch"
67
77
  else
68
- sh "cordova platform add #{platform}"
78
+ sh "npx --no-install cordova platform add #{platform}"
69
79
  end
70
80
  end
71
81
  end
@@ -79,11 +89,16 @@ module Fastlane
79
89
  args = [params[:release] ? '--release' : '--debug']
80
90
  args << '--device' if params[:device]
81
91
  args << '--browserify' if params[:browserify]
92
+
93
+ if !params[:cordova_build_config_file].to_s.empty?
94
+ args << "--buildConfig=#{Shellwords.escape(params[:cordova_build_config_file])}"
95
+ end
96
+
82
97
  android_args = self.get_android_args(params) if params[:platform].to_s == 'android'
83
98
  ios_args = self.get_ios_args(params) if params[:platform].to_s == 'ios'
84
99
 
85
100
  if params[:cordova_prepare]
86
- sh "cordova prepare #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
101
+ sh "npx --no-install cordova prepare #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
87
102
  end
88
103
 
89
104
  if params[:platform].to_s == 'ios' && !params[:build_number].to_s.empty?
@@ -97,14 +112,14 @@ module Fastlane
97
112
  )
98
113
  end
99
114
 
100
- sh "cordova compile #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
115
+ sh "npx --no-install cordova compile #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
101
116
  end
102
117
 
103
118
  def self.set_build_paths(is_release)
104
119
  app_name = self.get_app_name()
105
120
  build_type = is_release ? 'release' : 'debug'
106
121
 
107
- ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'] = "./platforms/android/build/outputs/apk/android-#{build_type}.apk"
122
+ ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'] = "./platforms/android/app/build/outputs/apk/#{build_type}/app-#{build_type}.apk"
108
123
  ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'] = "./platforms/ios/build/device/#{app_name}.ipa"
109
124
  end
110
125
 
@@ -227,7 +242,7 @@ module Fastlane
227
242
  FastlaneCore::ConfigItem.new(
228
243
  key: :cordova_prepare,
229
244
  env_name: "CORDOVA_PREPARE",
230
- description: "Specifies whether to run `cordova prepare` before building",
245
+ description: "Specifies whether to run `npx cordova prepare` before building",
231
246
  default_value: true,
232
247
  is_string: false
233
248
  ),
@@ -241,9 +256,25 @@ module Fastlane
241
256
  FastlaneCore::ConfigItem.new(
242
257
  key: :cordova_no_fetch,
243
258
  env_name: "CORDOVA_NO_FETCH",
244
- description: "Call `cordova platform add` with `--nofetch` parameter",
259
+ description: "Call `npx cordova platform add` with `--nofetch` parameter",
245
260
  default_value: false,
246
261
  is_string: false
262
+ ),
263
+ FastlaneCore::ConfigItem.new(
264
+ key: :build_flag,
265
+ env_name: "CORDOVA_IOS_BUILD_FLAG",
266
+ description: "An array of Xcode buildFlag. Will be appended on compile command",
267
+ is_string: false,
268
+ optional: true,
269
+ default_value: []
270
+ ),
271
+ FastlaneCore::ConfigItem.new(
272
+ key: :cordova_build_config_file,
273
+ env_name: "CORDOVA_BUILD_CONFIG_FILE",
274
+ description: "Call `npx cordova compile` with `--buildConfig=<ConfigFile>` to specify build config file path",
275
+ is_string: true,
276
+ optional: true,
277
+ default_value: ''
247
278
  )
248
279
  ]
249
280
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Cordova
3
- VERSION = "1.0.1"
3
+ VERSION = "3.0.0"
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: 1.0.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Almouro
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-12 00:00:00.000000000 Z
11
+ date: 2020-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -94,7 +94,7 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.111.0
97
- description:
97
+ description:
98
98
  email: contact@almouro.com
99
99
  executables: []
100
100
  extensions: []
@@ -110,7 +110,7 @@ homepage: https://github.com/almouro/fastlane-plugin-cordova
110
110
  licenses:
111
111
  - MIT
112
112
  metadata: {}
113
- post_install_message:
113
+ post_install_message:
114
114
  rdoc_options: []
115
115
  require_paths:
116
116
  - lib
@@ -125,9 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubyforge_project:
129
- rubygems_version: 2.4.5.1
130
- signing_key:
128
+ rubygems_version: 3.1.2
129
+ signing_key:
131
130
  specification_version: 4
132
131
  summary: Build your Cordova app
133
132
  test_files: []