fastlane-plugin-fivethree_ionic 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,13 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  module SharedValues
4
- FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE = :FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE
4
+ FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE =
5
+ :FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE
5
6
  end
6
7
 
7
8
  class FivBumpVersionAction < Action
8
9
  def self.run(params)
9
- sh "git add config.xml"
10
+ sh 'git add config.xml'
10
11
  sh "git commit -m \"#{params[:message]}\""
11
12
  end
12
13
 
@@ -15,25 +16,27 @@ module Fastlane
15
16
  #####################################################
16
17
 
17
18
  def self.description
18
- "A short description with <= 80 characters of what this action does"
19
+ 'A short description with <= 80 characters of what this action does'
19
20
  end
20
21
 
21
22
  def self.details
22
23
  # Optional:
23
24
  # this is your chance to provide a more detailed description of this action
24
- "You can use this action to do cool things..."
25
+ 'You can use this action to do cool things...'
25
26
  end
26
27
 
27
28
  def self.available_options
28
- # Define all options your action supports.
29
-
29
+ # Define all options your action supports.
30
+
30
31
  # Below a few examples
31
32
  [
32
- FastlaneCore::ConfigItem.new(key: :message,
33
- env_name: "FIV_BUILD_IONIC_ANDROID_IS_PROD",
34
- description: "Dev or Prod build",
35
- optional: false,
36
- type: String)
33
+ FastlaneCore::ConfigItem.new(
34
+ key: :message,
35
+ env_name: 'FIV_BUILD_IONIC_ANDROID_IS_PROD',
36
+ description: 'Dev or Prod build',
37
+ optional: false,
38
+ type: String
39
+ )
37
40
  ]
38
41
  end
39
42
 
@@ -41,7 +44,10 @@ module Fastlane
41
44
  # Define the shared values you are going to provide
42
45
  # Example
43
46
  [
44
- ['FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE', 'A description of what this value contains']
47
+ [
48
+ 'FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE',
49
+ 'A description of what this value contains'
50
+ ]
45
51
  ]
46
52
  end
47
53
 
@@ -51,11 +57,11 @@ module Fastlane
51
57
 
52
58
  def self.authors
53
59
  # So no one will ever forget your contribution to fastlane :) You are awesome btw!
54
- ["Your GitHub/Twitter Name"]
60
+ ['Your GitHub/Twitter Name']
55
61
  end
56
62
 
57
63
  def self.is_supported?(platform)
58
- platform == :android
64
+ platform == :android
59
65
  end
60
66
  end
61
67
  end
@@ -1,27 +1,27 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  module SharedValues
4
- FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE = :FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE
4
+ FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE =
5
+ :FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE
5
6
  end
6
7
 
7
8
  class FivCleanInstallAction < Action
8
9
  def self.run(params)
9
- if params[:platform].to_s == 'ios' || params[:platform].to_s == 'android'
10
+ if params[:platform].to_s == 'ios' ||
11
+ params[:platform].to_s == 'android'
10
12
  sh "rm -rf node_modules platforms/#{params[:platform]}"
11
13
  elsif params[:platform].to_s == 'browser'
12
- sh "rm -rf node_modules www"
14
+ sh 'rm -rf node_modules www'
13
15
  end
14
16
 
15
- if params[:plugins]
16
- sh "rm -rf plugins"
17
- end
17
+ sh 'rm -rf plugins' if params[:plugins]
18
18
 
19
19
  sh "#{params[:package_manager]} install"
20
20
 
21
- if params[:platform].to_s == 'ios' || params[:platform].to_s == 'android'
21
+ if params[:platform].to_s == 'ios' ||
22
+ params[:platform].to_s == 'android'
22
23
  sh "ionic cordova platform add #{params[:platform]}"
23
24
  end
24
-
25
25
  end
26
26
 
27
27
  #####################################################
@@ -29,47 +29,58 @@ module Fastlane
29
29
  #####################################################
30
30
 
31
31
  def self.description
32
- "A short description with <= 80 characters of what this action does"
32
+ 'A short description with <= 80 characters of what this action does'
33
33
  end
34
34
 
35
35
  def self.details
36
36
  # Optional:
37
37
  # this is your chance to provide a more detailed description of this action
38
- "You can use this action to do cool things..."
38
+ 'You can use this action to do cool things...'
39
39
  end
40
40
 
41
41
  def self.available_options
42
- # Define all options your action supports.
43
-
42
+ # Define all options your action supports.
43
+
44
44
  # Below a few examples
45
45
  [
46
46
  FastlaneCore::ConfigItem.new(
47
47
  key: :platform,
48
- env_name: "CORDOVA_PLATFORM",
49
- description: "Platform to build on. Can be android, ios or browser",
48
+ env_name: 'CORDOVA_PLATFORM',
49
+ description: 'Platform to build on. Can be android, ios or browser',
50
50
  is_string: true,
51
51
  default_value: '',
52
- verify_block: proc do |value|
53
- UI.user_error!("Platform should be either android, ios or browser") unless ['', 'android', 'ios', 'browser'].include? value
54
- end
52
+ verify_block:
53
+ proc do |value|
54
+ unless ['', 'android', 'ios', 'browser'].include? value
55
+ UI.user_error!(
56
+ 'Platform should be either android, ios or browser'
57
+ )
58
+ end
59
+ end
55
60
  ),
56
61
  FastlaneCore::ConfigItem.new(
57
62
  key: :plugins,
58
- env_name: "REFRESH_PLUGINS",
59
- description: "also refresh plugins",
63
+ env_name: 'REFRESH_PLUGINS',
64
+ description: 'also refresh plugins',
60
65
  default_value: false,
61
66
  is_string: false
62
67
  ),
63
68
  FastlaneCore::ConfigItem.new(
64
69
  key: :package_manager,
65
- env_name: "PACKAGE_MANAGER",
66
- description: "What package manager to use to install dependencies: e.g. yarn | npm",
70
+ env_name: 'PACKAGE_MANAGER',
71
+ description:
72
+ 'What package manager to use to install dependencies: e.g. yarn | npm',
67
73
  is_string: true,
68
74
  default_value: 'npm',
69
- verify_block: proc do |value|
70
- UI.user_error!("Platform should be either android, ios or browser") unless ['', 'yarn', 'npm'].include? value
71
- end
72
- ),
75
+ verify_block:
76
+ proc do |value|
77
+ unless ['', 'yarn', 'npm'].include? value
78
+ UI.user_error!(
79
+ 'Platform should be either android, ios or browser'
80
+ )
81
+ end
82
+ end
83
+ )
73
84
  ]
74
85
  end
75
86
 
@@ -77,7 +88,10 @@ module Fastlane
77
88
  # Define the shared values you are going to provide
78
89
  # Example
79
90
  [
80
- ['FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE', 'A description of what this value contains']
91
+ [
92
+ 'FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE',
93
+ 'A description of what this value contains'
94
+ ]
81
95
  ]
82
96
  end
83
97
 
@@ -87,11 +101,11 @@ module Fastlane
87
101
 
88
102
  def self.authors
89
103
  # So no one will ever forget your contribution to fastlane :) You are awesome btw!
90
- ["Your GitHub/Twitter Name"]
104
+ ['Your GitHub/Twitter Name']
91
105
  end
92
106
 
93
107
  def self.is_supported?(platform)
94
- platform == :android
108
+ platform == :android
95
109
  end
96
110
  end
97
111
  end
@@ -11,70 +11,90 @@ module Fastlane
11
11
 
12
12
  isIos = params[:ios]
13
13
  if (isIos)
14
- app_build_number = sh "echo \"cat //*[local-name()='widget']/@ios-CFBundleVersion\" | xmllint --shell #{params[:pathToConfigXML]}| awk -F'[=\"]' '!/>/{print $(NF-1)}'"
14
+ app_build_number =
15
+ sh "echo \"cat //*[local-name()='widget']/@ios-CFBundleVersion\" | xmllint --shell #{
16
+ params[:pathToConfigXML]
17
+ }| awk -F'[=\"]' '!/>/{print $(NF-1)}'"
15
18
  puts app_build_number.length
16
19
 
17
- if(app_build_number.length == 0)
18
- new_contents = text
19
- .gsub(/<widget /, "<widget ios-CFBundleVersion=\"#{1}\" ")
20
+ if (app_build_number.length == 0)
21
+ new_contents =
22
+ text.gsub(/<widget /, "<widget ios-CFBundleVersion=\"#{1}\" ")
20
23
  else
21
- build_number = app_build_number.to_i + 1
22
- new_contents = text
23
- .gsub(/ios-CFBundleVersion="[0-9]*"/, "ios-CFBundleVersion=\"#{build_number}\"")
24
+ build_number = app_build_number.to_i + 1
25
+ new_contents =
26
+ text.gsub(
27
+ /ios-CFBundleVersion="[0-9]*"/,
28
+ "ios-CFBundleVersion=\"#{build_number}\""
29
+ )
24
30
  end
25
31
  else
26
- app_build_number = sh "echo \"cat //*[local-name()='widget']/@android-versionCode\" | xmllint --shell #{params[:pathToConfigXML]}| awk -F'[=\"]' '!/>/{print $(NF-1)}'"
32
+ app_build_number =
33
+ sh "echo \"cat //*[local-name()='widget']/@android-versionCode\" | xmllint --shell #{
34
+ params[:pathToConfigXML]
35
+ }| awk -F'[=\"]' '!/>/{print $(NF-1)}'"
27
36
  puts app_build_number.length
28
37
 
29
-
30
- if(app_build_number.length == 0)
31
- new_contents = text
32
- .gsub(/<widget /, "<widget android-versionCode=\"#{1}\" ")
38
+ if (app_build_number.length == 0)
39
+ new_contents =
40
+ text.gsub(/<widget /, "<widget android-versionCode=\"#{1}\" ")
33
41
  else
34
- build_number = app_build_number.to_i + 1
35
- new_contents = text
36
- .gsub(/android-versionCode="[0-9]*"/, "android-versionCode=\"#{build_number}\"")
42
+ build_number = app_build_number.to_i + 1
43
+ new_contents =
44
+ text.gsub(
45
+ /android-versionCode="[0-9]*"/,
46
+ "android-versionCode=\"#{build_number}\""
47
+ )
37
48
  end
38
-
39
49
  end
40
50
 
41
- File.open(params[:pathToConfigXML], "w") {|file| file.puts new_contents}
42
- return build_number
51
+ File.open(params[:pathToConfigXML], 'w') do |file|
52
+ file.puts new_contents
53
+ end
54
+ return build_number
43
55
  end
44
56
 
45
57
  def self.description
46
- "fastlane plugin for ionic 4"
58
+ 'fastlane plugin for ionic 4'
47
59
  end
48
60
 
49
61
  def self.authors
50
- ["Gary Großgarten"]
62
+ ['Gary Großgarten']
51
63
  end
52
64
 
53
65
  def self.return_value
54
- "returns the new build number"
55
-
66
+ 'returns the new build number'
56
67
  end
57
68
 
58
69
  def self.details
59
70
  # Optional:
60
- ""
71
+ ''
61
72
  end
62
73
 
63
74
  def self.available_options
64
75
  [
65
- FastlaneCore::ConfigItem.new(key: :ios,
66
- env_name: "FIV_INCREMENT_BUILD_NO_IOS",
67
- description: "---",
68
- optional: false,
69
- type: Boolean),
70
- FastlaneCore::ConfigItem.new(key: :pathToConfigXML,
71
- env_name: "FIV_INCREMENT_BUILD_CONFIG",
72
- description: "---",
73
- optional: false,
74
- verify_block: proc do | value |
75
- UI.user_error!("Couldnt find config.xml! Please change your path.") unless File.exist?(value)
76
- end ,
77
- type: String)
76
+ FastlaneCore::ConfigItem.new(
77
+ key: :ios,
78
+ env_name: 'FIV_INCREMENT_BUILD_NO_IOS',
79
+ description: '---',
80
+ optional: false,
81
+ type: Boolean
82
+ ),
83
+ FastlaneCore::ConfigItem.new(
84
+ key: :pathToConfigXML,
85
+ env_name: 'FIV_INCREMENT_BUILD_CONFIG',
86
+ description: '---',
87
+ optional: false,
88
+ verify_block:
89
+ proc do |value|
90
+ unless File.exist?(value)
91
+ UI.user_error!(
92
+ 'Couldnt find config.xml! Please change your path.'
93
+ )
94
+ end
95
+ end,
96
+ type: String
97
+ )
78
98
  ]
79
99
  end
80
100
 
@@ -7,12 +7,11 @@ module Fastlane
7
7
  end
8
8
 
9
9
  class FivIonicAction < Action
10
-
11
10
  ANDROID_ARGS_MAP = {
12
11
  keystore_path: 'keystore',
13
12
  keystore_password: 'storePassword',
14
13
  key_password: 'password',
15
- keystore_alias: 'alias',
14
+ keystore_alias: 'alias'
16
15
  }
17
16
 
18
17
  IOS_ARGS_MAP = {
@@ -21,9 +20,7 @@ module Fastlane
21
20
  provisioning_profile: 'provisioningProfile'
22
21
  }
23
22
 
24
- PWA_ARGS_MAP = {
25
-
26
- }
23
+ PWA_ARGS_MAP = {}
27
24
 
28
25
  # do rewriting and copying of action params
29
26
  def self.get_platform_args(params, args_map)
@@ -50,19 +47,18 @@ module Fastlane
50
47
  end
51
48
 
52
49
  def self.get_ios_args(params)
53
- app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
50
+ app_identifier =
51
+ CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
54
52
 
55
53
  if params[:provisioning_profile].empty?
56
54
  # If `match` or `sigh` were used before this, use the certificates returned from there
57
- params[:provisioning_profile] = ENV['SIGH_UUID'] || ENV["sigh_#{app_identifier}_#{params[:type].sub('-', '')}"]
55
+ params[:provisioning_profile] =
56
+ ENV['SIGH_UUID'] ||
57
+ ENV["sigh_#{app_identifier}_#{params[:type].sub('-', '')}"]
58
58
  end
59
59
 
60
- if params[:type] == 'adhoc'
61
- params[:type] = 'ad-hoc'
62
- end
63
- if params[:type] == 'appstore'
64
- params[:type] = 'app-store'
65
- end
60
+ params[:type] = 'ad-hoc' if params[:type] == 'adhoc'
61
+ params[:type] = 'app-store' if params[:type] == 'appstore'
66
62
 
67
63
  return self.get_platform_args(params, IOS_ARGS_MAP)
68
64
  end
@@ -81,29 +77,38 @@ module Fastlane
81
77
  # app_name
82
78
  def self.get_app_name
83
79
  config = REXML::Document.new(File.open('config.xml'))
84
- return config.elements['widget'].elements['name'].first.value # TODO: Simplify!? (Check logic in cordova)
80
+ return config.elements['widget'].elements['name'].first.value
85
81
  end
86
82
 
87
83
  # actual building! (run #2)
88
84
  def self.build(params)
89
85
  args = [params[:release] ? '--release' : '--debug']
90
86
  args << '--prod' if params[:prod]
91
- android_args = self.get_android_args(params) if params[:platform].to_s == 'android'
87
+ if params[:platform].to_s == 'android'
88
+ android_args = self.get_android_args(params)
89
+ end
92
90
  ios_args = self.get_ios_args(params) if params[:platform].to_s == 'ios'
93
- pwa_args = self.get_pwa_args(params) if params[:platform].to_s == 'browser'
91
+ if params[:platform].to_s == 'browser'
92
+ pwa_args = self.get_pwa_args(params)
93
+ end
94
94
 
95
95
  if params[:cordova_prepare]
96
96
  # TODO: Remove params not allowed/used for `prepare`
97
97
  sh "ionic cordova prepare #{params[:platform]} #{args.join(' ')}"
98
98
  end
99
99
 
100
-
101
100
  if params[:platform].to_s == 'ios'
102
- sh "ionic cordova compile #{params[:platform]} #{args.join(' ')} -- #{ios_args}"
101
+ sh "ionic cordova compile #{params[:platform]} #{args.join(' ')} -- #{
102
+ ios_args
103
+ }"
103
104
  elsif params[:platform].to_s == 'android'
104
- sh "ionic cordova compile #{params[:platform]} #{args.join(' ')} -- -- #{android_args}"
105
+ sh "ionic cordova compile #{params[:platform]} #{
106
+ args.join(' ')
107
+ } -- -- #{android_args}"
105
108
  elsif params[:platform].to_s == 'browser'
106
- sh "ionic cordova compile #{params[:platform]} #{args.join(' ')} -- -- #{pwa_args}"
109
+ sh "ionic cordova compile #{params[:platform]} #{
110
+ args.join(' ')
111
+ } -- -- #{pwa_args}"
107
112
  end
108
113
  end
109
114
 
@@ -112,23 +117,25 @@ module Fastlane
112
117
  app_name = self.get_app_name
113
118
  build_type = is_release ? 'release' : 'debug'
114
119
  apk_name = is_release ? 'app-release-unsigned' : 'app-debug'
115
- ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'] = "./platforms/android/app/build/outputs/apk/#{build_type}/#{apk_name}.apk"
116
- ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'] = "./platforms/ios/build/device/#{app_name}.ipa"
117
- ENV['CORDOVA_PWA_RELEASE_BUILD_PATH'] = "./platforms/browser/www"
120
+ ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'] =
121
+ "./platforms/android/app/build/outputs/apk/#{build_type}/#{
122
+ apk_name
123
+ }.apk"
124
+ ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'] =
125
+ "./platforms/ios/build/device/#{app_name}.ipa"
126
+ ENV['CORDOVA_PWA_RELEASE_BUILD_PATH'] = './platforms/browser/www'
118
127
 
119
128
  # TODO: https://github.com/bamlab/fastlane-plugin-cordova/issues/7
120
129
  end
121
130
 
122
131
  def self.run(params)
123
- if params[:fresh]
124
- Fastlane::Actions::FivCleanInstallAction.run(params)
125
- end
132
+ Fastlane::Actions::FivCleanInstallAction.run(params) if params[:fresh]
126
133
  self.check_and_add_platform(params[:platform])
127
134
  self.build(params)
128
135
  self.set_build_paths(params[:release])
129
136
 
130
137
  if params[:platform].to_s == 'ios'
131
- return ENV['CORDOVA_IOS_RELEASE_BUILD_PATH']
138
+ return ENV['CORDOVA_IOS_RELEASE_BUILD_PATH']
132
139
  elsif params[:platform].to_s == 'android'
133
140
  return ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH']
134
141
  elsif params[:platform].to_s == 'browser'
@@ -141,140 +148,178 @@ module Fastlane
141
148
  #####################################################
142
149
 
143
150
  def self.description
144
- "Build your Ionic app"
151
+ 'Build your Ionic app'
145
152
  end
146
153
 
147
154
  def self.details
148
- "Easily integrate your Ionic build into a Fastlane setup"
155
+ 'Easily integrate your Ionic build into a Fastlane setup'
149
156
  end
150
157
 
151
158
  def self.available_options
152
159
  [
153
160
  FastlaneCore::ConfigItem.new(
154
161
  key: :platform,
155
- env_name: "CORDOVA_PLATFORM",
156
- description: "Platform to build on. Can be android, ios or browser",
162
+ env_name: 'CORDOVA_PLATFORM',
163
+ description: 'Platform to build on. Can be android, ios or browser',
157
164
  is_string: true,
158
165
  default_value: '',
159
- verify_block: proc do |value|
160
- UI.user_error!("Platform should be either android or ios") unless ['', 'android', 'ios', 'browser'].include? value
161
- end
166
+ verify_block:
167
+ proc do |value|
168
+ unless ['', 'android', 'ios', 'browser'].include? value
169
+ UI.user_error!('Platform should be either android or ios')
170
+ end
171
+ end
162
172
  ),
163
173
  FastlaneCore::ConfigItem.new(
164
174
  key: :release,
165
- env_name: "CORDOVA_RELEASE",
166
- description: "Build for release if true, or for debug if false",
175
+ env_name: 'CORDOVA_RELEASE',
176
+ description: 'Build for release if true, or for debug if false',
167
177
  is_string: false,
168
178
  default_value: true,
169
- verify_block: proc do |value|
170
- UI.user_error!("Release should be boolean") unless [false, true].include? value
171
- end
179
+ verify_block:
180
+ proc do |value|
181
+ unless [false, true].include? value
182
+ UI.user_error!('Release should be boolean')
183
+ end
184
+ end
172
185
  ),
173
186
  FastlaneCore::ConfigItem.new(
174
187
  key: :prod,
175
- env_name: "IONIC_PROD",
176
- description: "Build for production",
188
+ env_name: 'IONIC_PROD',
189
+ description: 'Build for production',
177
190
  is_string: false,
178
191
  default_value: false,
179
- verify_block: proc do |value|
180
- UI.user_error!("Prod should be boolean") unless [false, true].include? value
181
- end
192
+ verify_block:
193
+ proc do |value|
194
+ unless [false, true].include? value
195
+ UI.user_error!('Prod should be boolean')
196
+ end
197
+ end
182
198
  ),
183
199
  FastlaneCore::ConfigItem.new(
184
200
  key: :type,
185
- env_name: "CORDOVA_IOS_PACKAGE_TYPE",
186
- description: "This will determine what type of build is generated by Xcode. Valid options are development, enterprise, adhoc, and appstore",
201
+ env_name: 'CORDOVA_IOS_PACKAGE_TYPE',
202
+ description:
203
+ 'This will determine what type of build is generated by Xcode. Valid options are development, enterprise, adhoc, and appstore',
187
204
  is_string: true,
188
205
  default_value: 'appstore',
189
- verify_block: proc do |value|
190
- UI.user_error!("Valid options are development, enterprise, adhoc, and appstore.") unless ['development', 'enterprise', 'adhoc', 'appstore', 'ad-hoc', 'app-store'].include? value
191
- end
206
+ verify_block:
207
+ proc do |value|
208
+ unless %w[
209
+ development
210
+ enterprise
211
+ adhoc
212
+ appstore
213
+ ad-hoc
214
+ app-store
215
+ ].include? value
216
+ UI.user_error!(
217
+ 'Valid options are development, enterprise, adhoc, and appstore.'
218
+ )
219
+ end
220
+ end
192
221
  ),
193
222
  FastlaneCore::ConfigItem.new(
194
223
  key: :team_id,
195
- env_name: "CORDOVA_IOS_TEAM_ID",
196
- description: "The development team (Team ID) to use for code signing",
224
+ env_name: 'CORDOVA_IOS_TEAM_ID',
225
+ description:
226
+ 'The development team (Team ID) to use for code signing',
197
227
  is_string: true,
198
- default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
228
+ default_value:
229
+ CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
199
230
  ),
200
231
  FastlaneCore::ConfigItem.new(
201
232
  key: :provisioning_profile,
202
- env_name: "CORDOVA_IOS_PROVISIONING_PROFILE",
203
- description: "GUID of the provisioning profile to be used for signing",
233
+ env_name: 'CORDOVA_IOS_PROVISIONING_PROFILE',
234
+ description:
235
+ 'GUID of the provisioning profile to be used for signing',
204
236
  is_string: true,
205
237
  default_value: ''
206
238
  ),
207
239
  FastlaneCore::ConfigItem.new(
208
240
  key: :keystore_path,
209
- env_name: "CORDOVA_ANDROID_KEYSTORE_PATH",
210
- description: "Path to the Keystore for Android",
241
+ env_name: 'CORDOVA_ANDROID_KEYSTORE_PATH',
242
+ description: 'Path to the Keystore for Android',
211
243
  is_string: true,
212
244
  default_value: ''
213
245
  ),
214
246
  FastlaneCore::ConfigItem.new(
215
247
  key: :keystore_password,
216
- env_name: "CORDOVA_ANDROID_KEYSTORE_PASSWORD",
217
- description: "Android Keystore password",
248
+ env_name: 'CORDOVA_ANDROID_KEYSTORE_PASSWORD',
249
+ description: 'Android Keystore password',
218
250
  is_string: true,
219
251
  default_value: ''
220
252
  ),
221
253
  FastlaneCore::ConfigItem.new(
222
254
  key: :key_password,
223
- env_name: "CORDOVA_ANDROID_KEY_PASSWORD",
224
- description: "Android Key password (default is keystore password)",
255
+ env_name: 'CORDOVA_ANDROID_KEY_PASSWORD',
256
+ description: 'Android Key password (default is keystore password)',
225
257
  is_string: true,
226
258
  default_value: ''
227
259
  ),
228
260
  FastlaneCore::ConfigItem.new(
229
261
  key: :keystore_alias,
230
- env_name: "CORDOVA_ANDROID_KEYSTORE_ALIAS",
231
- description: "Android Keystore alias",
262
+ env_name: 'CORDOVA_ANDROID_KEYSTORE_ALIAS',
263
+ description: 'Android Keystore alias',
232
264
  is_string: true,
233
265
  default_value: ''
234
266
  ),
235
267
  FastlaneCore::ConfigItem.new(
236
268
  key: :cordova_prepare,
237
- env_name: "CORDOVA_PREPARE",
238
- description: "Specifies whether to run `ionic cordova prepare` before building",
269
+ env_name: 'CORDOVA_PREPARE',
270
+ description:
271
+ 'Specifies whether to run `ionic cordova prepare` before building',
239
272
  default_value: true,
240
273
  is_string: false
241
274
  ),
242
275
  FastlaneCore::ConfigItem.new(
243
276
  key: :fresh,
244
- env_name: "BUILD_FRESH",
245
- description: "Clean install packages, plugins and platform",
277
+ env_name: 'BUILD_FRESH',
278
+ description: 'Clean install packages, plugins and platform',
246
279
  default_value: false,
247
280
  is_string: false
248
281
  ),
249
282
  FastlaneCore::ConfigItem.new(
250
283
  key: :plugins,
251
- env_name: "REFRESH_PLUGINS",
252
- description: "also refresh plugins",
284
+ env_name: 'REFRESH_PLUGINS',
285
+ description: 'also refresh plugins',
253
286
  default_value: false,
254
287
  is_string: false
255
288
  ),
256
289
  FastlaneCore::ConfigItem.new(
257
290
  key: :package_manager,
258
- env_name: "PACKAGE_MANAGER",
259
- description: "What package manager to use to install dependencies: e.g. yarn | npm",
291
+ env_name: 'PACKAGE_MANAGER',
292
+ description:
293
+ 'What package manager to use to install dependencies: e.g. yarn | npm',
260
294
  is_string: true,
261
295
  default_value: 'npm',
262
- verify_block: proc do |value|
263
- UI.user_error!("Platform should be either android, ios or browser") unless ['', 'yarn', 'npm'].include? value
264
- end
265
- ),
296
+ verify_block:
297
+ proc do |value|
298
+ unless ['', 'yarn', 'npm'].include? value
299
+ UI.user_error!(
300
+ 'Platform should be either android, ios or browser'
301
+ )
302
+ end
303
+ end
304
+ )
266
305
  ]
267
306
  end
268
307
 
269
308
  def self.output
270
309
  [
271
- ['CORDOVA_ANDROID_RELEASE_BUILD_PATH', 'Path to the signed release APK if it was generated'],
272
- ['CORDOVA_IOS_RELEASE_BUILD_PATH', 'Path to the signed release IPA if it was generated']
310
+ [
311
+ 'CORDOVA_ANDROID_RELEASE_BUILD_PATH',
312
+ 'Path to the signed release APK if it was generated'
313
+ ],
314
+ [
315
+ 'CORDOVA_IOS_RELEASE_BUILD_PATH',
316
+ 'Path to the signed release IPA if it was generated'
317
+ ]
273
318
  ]
274
319
  end
275
320
 
276
321
  def self.authors
277
- ['fivethree']
322
+ %w[fivethree]
278
323
  end
279
324
 
280
325
  def self.is_supported?(platform)
@@ -282,11 +327,9 @@ module Fastlane
282
327
  end
283
328
 
284
329
  def self.example_code
285
- [
286
- "ionic(
330
+ ["ionic(
287
331
  platform: 'ios'
288
- )"
289
- ]
332
+ )"]
290
333
  end
291
334
 
292
335
  def self.category
@@ -294,4 +337,4 @@ module Fastlane
294
337
  end
295
338
  end
296
339
  end
297
- end
340
+ end