fastlane-plugin-us_ionic 0.2.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 94b962ba88787b599c4de5b8851105d710b8d4b5cb3564a16f8bae14ac038bed
4
+ data.tar.gz: '049885bdc579ffd298528ac4147172d4ed154e94bc7d5caa3b75ace1bd177d46'
5
+ SHA512:
6
+ metadata.gz: a85c267ab4c92ac89f6a792a51c5017239ce8d97b9e928274d5b2113b4128cffcd418f45140b2c0eeaaf4d520e4da6793adbdc4061c3e5eaf7f87f45cc04d0f7
7
+ data.tar.gz: 8a9ac3c49817fe6afaccb43c662ffbf7284d644ae2fccddd31304ba105b751e2effde474568b4ff4fec1adaec5fe7d6cc6a083c261dceed7009fdede1b6c375f
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Jan Piotrowski <piotrowski@gmail.com>
4
+ Copyright (c) 2016 Almouro <contact@almouro.com>
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,150 @@
1
+ # _fastlane_ Plugin for Ionic CLI
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-ionic) [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/ionic-zone/fastlane-plugin-ionic/blob/master/LICENSE)
4
+ [![Gem](https://img.shields.io/gem/v/fastlane-plugin-ionic.svg?style=flat)](http://rubygems.org/gems/fastlane-plugin-ionic)
5
+
6
+ This _fastlane_ plugin helps you build your **Ionic Cordova** project via the [`ionic` CLI](https://ionicframework.com/docs/cli/).
7
+
8
+ It is based on [fastlane-plugin-cordova](https://github.com/bamlab/fastlane-plugin-cordova) (where it borrows a lot of its code. Thanks!).
9
+
10
+ ## Getting Started
11
+
12
+ This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-ionic`, add it to your project by running:
13
+
14
+ ```bash
15
+ fastlane add_plugin us_ionic
16
+ ```
17
+
18
+ ## Actions
19
+
20
+ ### `ionic`
21
+
22
+ Runs `ionic cordova build` (technically: `ionic cordova prepare` first, then `ionic cordova compile` [which is the same as what `build` does internally]) to build your Ionic project.
23
+
24
+ ```ruby
25
+ ionic(
26
+ platform: 'ios', # Build your iOS Ionic project
27
+ )
28
+ ionic(
29
+ platform: 'android', # Build your Android Ionic project
30
+ release: false # Build a "Debug" app
31
+ )
32
+ ```
33
+
34
+
35
+ ## Examples
36
+
37
+ Lanes using these actions could look like this:
38
+
39
+ ```ruby
40
+ platform :ios do
41
+ desc "Deploy ios app on the appstore"
42
+
43
+ lane :deploy do
44
+ match(type: "appstore")
45
+ ionic(platform: 'ios')
46
+ deliver(ipa: ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'])
47
+ end
48
+ end
49
+
50
+ platform :android do
51
+ desc "Deploy android app on play store"
52
+
53
+ lane :deploy do
54
+ ionic(
55
+ platform: 'android',
56
+ keystore_path: './prod.keystore',
57
+ keystore_alias: 'prod',
58
+ keystore_password: 'password'
59
+ )
60
+ supply(apk: ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'])
61
+ end
62
+ end
63
+ ```
64
+
65
+ with an `Appfile` such as
66
+
67
+ ```ruby
68
+ app_identifier "com.awesome.app"
69
+ apple_id "apple@id.com"
70
+ team_id "28323HT"
71
+ ```
72
+
73
+ ---
74
+
75
+ The `ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH']` is only valid for `cordova-android` 7.x and newer (which you should be using anyway!).
76
+
77
+ If you're using **Crosswalk** (which oyu should not really be doing anymore), replace `supply(apk: ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'])` (and equivalents) by:
78
+
79
+ ```ruby
80
+ supply(
81
+ apk_paths: [
82
+ 'platforms/android/build/outputs/apk/android-armv7-release.apk',
83
+ 'platforms/android/build/outputs/apk/android-x86-release.apk'
84
+ ],
85
+ )
86
+ ```
87
+
88
+ ## Plugin API
89
+
90
+ To check what's available in the plugin, install it in a project and run at the root of the project:
91
+
92
+ ```
93
+ fastlane actions ionic
94
+ ```
95
+
96
+ Which will produce:
97
+
98
+ | Key | Description | Env Var | Default |
99
+ | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | --------- |
100
+ | **platform** | Platform to build on. <br>Should be either android or ios | CORDOVA_PLATFORM | |
101
+ | **release** | Build for release if true,<br>or for debug if false | CORDOVA_RELEASE | *true* |
102
+ | **device** | Build for device | CORDOVA_DEVICE | *true* |
103
+ | **prod** | Build for production | IONIC_PROD | *false* |
104
+ | **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 |
105
+ | **verbose** | Pipe out more verbose output to the shell | CORDOVA_VERBOSE | false |
106
+ | **team_id** | The development team (Team ID) to use for code signing | CORDOVA_IOS_TEAM_ID | *28323HT* |
107
+ | **provisioning_profile** | GUID of the provisioning profile to be used for signing | CORDOVA_IOS_PROVISIONING_PROFILE | |
108
+ | **android_package_type** | This will determine what type of Android build is generated. Valid options are `apk` and `bundle` | CORDOVA_ANDROID_PACKAGE_TYPE | apk |
109
+ | **keystore_path** | Path to the Keystore for Android | CORDOVA_ANDROID_KEYSTORE_PATH | |
110
+ | **keystore_password** | Android Keystore password | CORDOVA_ANDROID_KEYSTORE_PASSWORD | |
111
+ | **key_password** | Android Key password (default is keystore password) | CORDOVA_ANDROID_KEY_PASSWORD | |
112
+ | **keystore_alias** | Android Keystore alias | CORDOVA_ANDROID_KEYSTORE_ALIAS | |
113
+ | **build_number** | Sets the build number for iOS and version code for Android | CORDOVA_BUILD_NUMBER | |
114
+ | **browserify** | Specifies whether to browserify build or not | CORDOVA_BROWSERIFY | *false* |
115
+ | **cordova_prepare** | Specifies whether to run `ionic cordova prepare` before building | CORDOVA_PREPARE | *true* |
116
+ | **min_sdk_version** | Overrides the value of minSdkVersion set in `AndroidManifest.xml` | CORDOVA_ANDROID_MIN_SDK_VERSION | '' |
117
+ | **cordova_no_fetch** | Specifies whether to run `ionic cordova platform add` with `--nofetch` parameter | CORDOVA_NO_FETCH | *false* |
118
+ | **cordova_no_resources** | Specifies whether to run `ionic cordova platform add` with `--no-resources` parameter | CORDOVA_NO_RESOURCES | *false* |
119
+ | **build_flag** | An array of Xcode buildFlag. Will be appended on compile command. | CORDOVA_IOS_BUILD_FLAG | [] |
120
+ | **cordova_build_config_file** | Call `ionic cordova compile` with `--buildConfig=<ConfigFile>` to specify build config file path | CORDOVA_BUILD_CONFIG_FILE | |
121
+
122
+
123
+ ## Run tests for this plugin
124
+
125
+ To run both the tests, and code style validation, run
126
+
127
+ ```
128
+ rake
129
+ ```
130
+
131
+ To automatically fix many of the styling issues, use
132
+ ```
133
+ rubocop -a
134
+ ```
135
+
136
+ ## Issues and Feedback
137
+
138
+ For any other issues and feedback about this plugin, please submit it to this repository.
139
+
140
+ ## Troubleshooting
141
+
142
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/PluginsTroubleshooting.md) doc in the main `fastlane` repo.
143
+
144
+ ## Using `fastlane` Plugins
145
+
146
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Plugins.md).
147
+
148
+ ## About `fastlane`
149
+
150
+ `fastlane` is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -0,0 +1,379 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ CORDOVA_IOS_RELEASE_BUILD_PATH = :CORDOVA_IOS_RELEASE_BUILD_PATH
5
+ CORDOVA_ANDROID_RELEASE_BUILD_PATH = :CORDOVA_ANDROID_RELEASE_BUILD_PATH
6
+ end
7
+
8
+ class IonicAction < Action
9
+ # valid action params
10
+
11
+ ANDROID_ARGS_MAP = {
12
+ keystore_path: 'keystore',
13
+ keystore_password: 'storePassword',
14
+ key_password: 'password',
15
+ keystore_alias: 'alias',
16
+ build_number: 'versionCode',
17
+ min_sdk_version: 'gradleArg=-PcdvMinSdkVersion',
18
+ cordova_no_fetch: 'cordovaNoFetch',
19
+ android_package_type: 'packageType'
20
+ }
21
+
22
+ IOS_ARGS_MAP = {
23
+ type: 'packageType',
24
+ team_id: 'developmentTeam',
25
+ provisioning_profile: 'provisioningProfile',
26
+ build_flag: 'buildFlag'
27
+ }
28
+
29
+ # extract arguments only valid for the platform from all arguments
30
+ # + map action params to the cli param they will be used for
31
+ def self.get_platform_args(params, platform_args_map)
32
+ platform_args = []
33
+ platform_args_map.each do |action_key, cli_param|
34
+ param_value = params[action_key]
35
+
36
+ # handle `build_flag` being an Array
37
+ if action_key.to_s == 'build_flag' && param_value.kind_of?(Array)
38
+ unless param_value.empty?
39
+ param_value.each do |flag|
40
+ platform_args << "--#{cli_param}=#{flag.shellescape}"
41
+ end
42
+ end
43
+ # handle all other cases
44
+ else
45
+ unless param_value.to_s.empty?
46
+ platform_args << "--#{cli_param}=#{Shellwords.escape(param_value)}"
47
+ end
48
+ end
49
+ end
50
+
51
+ return platform_args.join(' ')
52
+ end
53
+
54
+ def self.get_android_args(params)
55
+ if params[:key_password].empty?
56
+ params[:key_password] = params[:keystore_password]
57
+ end
58
+
59
+ return self.get_platform_args(params, ANDROID_ARGS_MAP)
60
+ end
61
+
62
+ def self.get_ios_args(params)
63
+ app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
64
+
65
+ if params[:provisioning_profile].empty?
66
+ # If `match` or `sigh` were used before this, use the certificates returned from there
67
+ params[:provisioning_profile] = ENV['SIGH_UUID'] || ENV["sigh_#{app_identifier}_#{params[:type].sub('-', '')}"]
68
+ end
69
+
70
+ if params[:type] == 'adhoc'
71
+ params[:type] = 'ad-hoc'
72
+ end
73
+ if params[:type] == 'appstore'
74
+ params[:type] = 'app-store'
75
+ end
76
+
77
+ return self.get_platform_args(params, IOS_ARGS_MAP)
78
+ end
79
+
80
+ # add platform if missing (run step #1)
81
+ def self.check_platform(params)
82
+ platform = params[:platform]
83
+ args = []
84
+ args << '--nofetch' if params[:cordova_no_fetch]
85
+ args << '--no-resources' if params[:cordova_no_resources]
86
+ if platform && !File.directory?("./platforms/#{platform}")
87
+ sh "ionic cordova platform add #{platform} --no-interactive #{args.join(' ')}"
88
+ end
89
+ end
90
+
91
+ # app_name
92
+ def self.get_app_name
93
+ config = REXML::Document.new(File.open('config.xml'))
94
+ return config.elements['widget'].elements['name'].first.value # TODO: Simplify!? (Check logic in cordova)
95
+ end
96
+
97
+ # actual building! (run step #2)
98
+ def self.build(params)
99
+ args = [params[:release] ? '--release' : '--debug']
100
+ args << '--device' if params[:device]
101
+ args << '--prod' if params[:prod]
102
+ args << '--browserify' if params[:browserify]
103
+ args << '--verbose' if params[:verbose]
104
+
105
+ if !params[:cordova_build_config_file].to_s.empty?
106
+ args << "--buildConfig=#{Shellwords.escape(params[:cordova_build_config_file])}"
107
+ end
108
+
109
+ android_args = self.get_android_args(params) if params[:platform].to_s == 'android'
110
+ ios_args = self.get_ios_args(params) if params[:platform].to_s == 'ios'
111
+
112
+ if params[:cordova_prepare]
113
+ # TODO: Remove params not allowed/used for `prepare`
114
+ sh "ionic cordova prepare #{params[:platform]} --no-interactive #{args.join(' ')}"
115
+ end
116
+
117
+ # special handling for `build_number` param
118
+ if params[:platform].to_s == 'ios' && !params[:build_number].to_s.empty?
119
+ cf_bundle_version = params[:build_number].to_s
120
+ Actions::UpdateInfoPlistAction.run(
121
+ xcodeproj: "./platforms/ios/#{self.get_app_name}.xcodeproj",
122
+ plist_path: "#{self.get_app_name}/#{self.get_app_name}-Info.plist",
123
+ block: lambda { |plist|
124
+ plist['CFBundleVersion'] = cf_bundle_version
125
+ }
126
+ )
127
+ end
128
+
129
+ if params[:platform].to_s == 'ios'
130
+ sh "ionic cordova compile #{params[:platform]} --no-interactive #{args.join(' ')} -- #{ios_args}"
131
+ elsif params[:platform].to_s == 'android'
132
+ sh "ionic cordova compile #{params[:platform]} --no-interactive #{args.join(' ')} -- -- #{android_args}"
133
+ end
134
+ end
135
+
136
+ # export build paths (run step #3)
137
+ def self.set_build_paths(params)
138
+ app_name = self.get_app_name
139
+ build_type = params[:release] ? 'release' : 'debug'
140
+
141
+ # Update the build path accordingly if Android is being
142
+ # built as an Android Application Bundle.
143
+ android_package_type = params[:android_package_type] || 'apk'
144
+ android_package_extension = android_package_type == 'bundle' ? '.aab' : '.apk'
145
+
146
+ ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'] = "./platforms/android/app/build/outputs/#{android_package_type}/#{build_type}/app-#{build_type}#{android_package_extension}"
147
+ ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'] = "./platforms/ios/build/device/#{app_name}.ipa"
148
+
149
+ # TODO: https://github.com/bamlab/fastlane-plugin-cordova/issues/7
150
+ # TODO: Set env vars that gym and Co automatically use
151
+ end
152
+
153
+ def self.run(params)
154
+ self.check_platform(params)
155
+ self.build(params)
156
+ self.set_build_paths(params)
157
+ end
158
+
159
+ #####################################################
160
+ # @!group Documentation
161
+ #####################################################
162
+
163
+ def self.description
164
+ "Build your Ionic app"
165
+ end
166
+
167
+ def self.details
168
+ "Easily integrate your Ionic build into a Fastlane setup"
169
+ end
170
+
171
+ def self.available_options
172
+ [
173
+ FastlaneCore::ConfigItem.new(
174
+ key: :platform,
175
+ env_name: "CORDOVA_PLATFORM",
176
+ description: "Platform to build on. Should be either android or ios",
177
+ is_string: true,
178
+ default_value: '',
179
+ verify_block: proc do |value|
180
+ UI.user_error!("Platform should be either android or ios") unless ['', 'android', 'ios'].include? value
181
+ end
182
+ ),
183
+ FastlaneCore::ConfigItem.new(
184
+ key: :release,
185
+ env_name: "CORDOVA_RELEASE",
186
+ description: "Build for release if true, or for debug if false",
187
+ is_string: false,
188
+ default_value: true,
189
+ verify_block: proc do |value|
190
+ UI.user_error!("Release should be boolean") unless [false, true].include? value
191
+ end
192
+ ),
193
+ FastlaneCore::ConfigItem.new(
194
+ key: :device,
195
+ env_name: "CORDOVA_DEVICE",
196
+ description: "Build for device",
197
+ is_string: false,
198
+ default_value: true,
199
+ verify_block: proc do |value|
200
+ UI.user_error!("Device should be boolean") unless [false, true].include? value
201
+ end
202
+ ),
203
+ FastlaneCore::ConfigItem.new(
204
+ key: :prod,
205
+ env_name: "IONIC_PROD",
206
+ description: "Build for production",
207
+ is_string: false,
208
+ default_value: false,
209
+ verify_block: proc do |value|
210
+ UI.user_error!("Prod should be boolean") unless [false, true].include? value
211
+ end
212
+ ),
213
+ FastlaneCore::ConfigItem.new(
214
+ key: :type,
215
+ env_name: "CORDOVA_IOS_PACKAGE_TYPE",
216
+ description: "This will determine what type of build is generated by Xcode. Valid options are development, enterprise, adhoc, and appstore",
217
+ is_string: true,
218
+ default_value: 'appstore',
219
+ verify_block: proc do |value|
220
+ UI.user_error!("Valid options are development, enterprise, adhoc, and appstore.") unless ['development', 'enterprise', 'adhoc', 'appstore', 'ad-hoc', 'app-store'].include? value
221
+ end
222
+ ),
223
+ FastlaneCore::ConfigItem.new(
224
+ key: :verbose,
225
+ env_name: "CORDOVA_VERBOSE",
226
+ description: "Pipe out more verbose output to the shell",
227
+ default_value: false,
228
+ is_string: false,
229
+ verify_block: proc do |value|
230
+ UI.user_error!("Verbose should be boolean") unless [false, true].include? value
231
+ end
232
+ ),
233
+ FastlaneCore::ConfigItem.new(
234
+ key: :team_id,
235
+ env_name: "CORDOVA_IOS_TEAM_ID",
236
+ description: "The development team (Team ID) to use for code signing",
237
+ is_string: true,
238
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
239
+ ),
240
+ FastlaneCore::ConfigItem.new(
241
+ key: :provisioning_profile,
242
+ env_name: "CORDOVA_IOS_PROVISIONING_PROFILE",
243
+ description: "GUID of the provisioning profile to be used for signing",
244
+ is_string: true,
245
+ default_value: ''
246
+ ),
247
+ FastlaneCore::ConfigItem.new(
248
+ key: :android_package_type,
249
+ env_name: "CORDOVA_ANDROID_PACKAGE_TYPE",
250
+ description: "This will determine what type of Android build is generated. Valid options are apk or bundle",
251
+ default_value: 'apk',
252
+ verify_block: proc do |value|
253
+ UI.user_error!("Valid options are apk or bundle.") unless ['apk', 'bundle'].include? value
254
+ end
255
+ ),
256
+ FastlaneCore::ConfigItem.new(
257
+ key: :keystore_path,
258
+ env_name: "CORDOVA_ANDROID_KEYSTORE_PATH",
259
+ description: "Path to the Keystore for Android",
260
+ is_string: true,
261
+ default_value: ''
262
+ ),
263
+ FastlaneCore::ConfigItem.new(
264
+ key: :keystore_password,
265
+ env_name: "CORDOVA_ANDROID_KEYSTORE_PASSWORD",
266
+ description: "Android Keystore password",
267
+ is_string: true,
268
+ default_value: ''
269
+ ),
270
+ FastlaneCore::ConfigItem.new(
271
+ key: :key_password,
272
+ env_name: "CORDOVA_ANDROID_KEY_PASSWORD",
273
+ description: "Android Key password (default is keystore password)",
274
+ is_string: true,
275
+ default_value: ''
276
+ ),
277
+ FastlaneCore::ConfigItem.new(
278
+ key: :keystore_alias,
279
+ env_name: "CORDOVA_ANDROID_KEYSTORE_ALIAS",
280
+ description: "Android Keystore alias",
281
+ is_string: true,
282
+ default_value: ''
283
+ ),
284
+ FastlaneCore::ConfigItem.new(
285
+ key: :build_number,
286
+ env_name: "CORDOVA_BUILD_NUMBER",
287
+ description: "Sets the build number for iOS and version code for Android",
288
+ optional: true,
289
+ is_string: false
290
+ ),
291
+ FastlaneCore::ConfigItem.new(
292
+ key: :browserify,
293
+ env_name: "CORDOVA_BROWSERIFY",
294
+ description: "Specifies whether to browserify build or not",
295
+ default_value: false,
296
+ is_string: false
297
+ ),
298
+ FastlaneCore::ConfigItem.new(
299
+ key: :cordova_prepare,
300
+ env_name: "CORDOVA_PREPARE",
301
+ description: "Specifies whether to run `ionic cordova prepare` before building",
302
+ default_value: true,
303
+ is_string: false
304
+ ),
305
+ FastlaneCore::ConfigItem.new(
306
+ key: :min_sdk_version,
307
+ env_name: "CORDOVA_ANDROID_MIN_SDK_VERSION",
308
+ description: "Overrides the value of minSdkVersion set in AndroidManifest.xml",
309
+ default_value: '',
310
+ is_string: false
311
+ ),
312
+ FastlaneCore::ConfigItem.new(
313
+ key: :cordova_no_fetch,
314
+ env_name: "CORDOVA_NO_FETCH",
315
+ description: "Call `cordova platform add` with `--nofetch` parameter",
316
+ default_value: false,
317
+ is_string: false
318
+ ),
319
+ FastlaneCore::ConfigItem.new(
320
+ key: :cordova_no_resources,
321
+ env_name: "CORDOVA_NO_RESOURCES",
322
+ description: "Call `cordova platform add` with `--no-resources` parameter",
323
+ default_value: false,
324
+ is_string: false
325
+ ),
326
+ FastlaneCore::ConfigItem.new(
327
+ key: :build_flag,
328
+ env_name: "CORDOVA_IOS_BUILD_FLAG",
329
+ description: "An array of Xcode buildFlag. Will be appended on compile command",
330
+ is_string: false,
331
+ optional: true,
332
+ default_value: []
333
+ ),
334
+ FastlaneCore::ConfigItem.new(
335
+ key: :cordova_build_config_file,
336
+ env_name: "CORDOVA_BUILD_CONFIG_FILE",
337
+ description: "Call `ionic cordova compile` with `--buildConfig=<ConfigFile>` to specify build config file path",
338
+ is_string: true,
339
+ optional: true,
340
+ default_value: ''
341
+ )
342
+ ]
343
+ end
344
+
345
+ def self.output
346
+ [
347
+ ['CORDOVA_ANDROID_RELEASE_BUILD_PATH', 'Path to the signed release APK or AAB if it was generated'],
348
+ ['CORDOVA_IOS_RELEASE_BUILD_PATH', 'Path to the signed release IPA if it was generated']
349
+ ]
350
+ end
351
+
352
+ def self.authors
353
+ ['Jan Piotrowski']
354
+ end
355
+
356
+ def self.is_supported?(platform)
357
+ true
358
+ end
359
+
360
+ def self.example_code
361
+ [
362
+ "ionic(
363
+ platform: 'ios'
364
+ )",
365
+ "ionic(
366
+ platform: 'android',
367
+ keystore_path: './staging.keystore',
368
+ keystore_alias: 'alias_name',
369
+ keystore_password: 'store_password'
370
+ )"
371
+ ]
372
+ end
373
+
374
+ def self.category
375
+ :building
376
+ end
377
+ end
378
+ end
379
+ end
@@ -0,0 +1,12 @@
1
+ module Fastlane
2
+ module Helper
3
+ class IonicHelper
4
+ # class methods that you define here become available in your action
5
+ # as `Helper::IonicHelper.your_method`
6
+ #
7
+ def self.show_message
8
+ UI.message("Hello from the ionic plugin helper!")
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module UsIonic
3
+ VERSION = "0.2.2"
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ require 'fastlane/plugin/us_ionic/version'
2
+
3
+ module Fastlane
4
+ module UsIonic
5
+ # Return all .rb files inside the "actions" and "helper" directory
6
+ def self.all_classes
7
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
8
+ end
9
+ end
10
+ end
11
+
12
+ # By default we want to import all available actions and helpers
13
+ # A plugin can contain any number of actions and plugins
14
+ Fastlane::UsIonic.all_classes.each do |current|
15
+ require current
16
+ end
metadata ADDED
@@ -0,0 +1,132 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-us_ionic
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.2
5
+ platform: ruby
6
+ authors:
7
+ - Jan Piotrowski
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pry
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: fastlane
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 1.111.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 1.111.0
97
+ description:
98
+ email: piotrowski+rubygems@gmail.com
99
+ executables: []
100
+ extensions: []
101
+ extra_rdoc_files: []
102
+ files:
103
+ - LICENSE
104
+ - README.md
105
+ - lib/fastlane/plugin/us_ionic.rb
106
+ - lib/fastlane/plugin/us_ionic/actions/ionic_action.rb
107
+ - lib/fastlane/plugin/us_ionic/helper/ionic_helper.rb
108
+ - lib/fastlane/plugin/us_ionic/version.rb
109
+ homepage: https://github.com/ultrastark/fastlane-plugin-us_ionic
110
+ licenses:
111
+ - MIT
112
+ metadata: {}
113
+ post_install_message:
114
+ rdoc_options: []
115
+ require_paths:
116
+ - lib
117
+ required_ruby_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ requirements: []
128
+ rubygems_version: 3.0.3.1
129
+ signing_key:
130
+ specification_version: 4
131
+ summary: Build your Ionic app
132
+ test_files: []