Skip to content

Commit

Permalink
Adding --configuration option
Browse files Browse the repository at this point in the history
  • Loading branch information
misterwell committed Sep 3, 2020
1 parent 04abaa3 commit 610a302
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Which will produce:
| **min_sdk_version** | Overrides the value of minSdkVersion set in `AndroidManifest.xml` | CORDOVA_ANDROID_MIN_SDK_VERSION | '' |
| **cordova_no_fetch** | Specifies whether to run `ionic cordova platform add` with `--nofetch` parameter | CORDOVA_NO_FETCH | *false* |
| **cordova_no_resources** | Specifies whether to run `ionic cordova platform add` with `--no-resources` parameter | CORDOVA_NO_RESOURCES | *false* |
| **configuration** | Call `ionic cordova compile` with `--configuration=<Configuration>` to specify the configuration to use (for instance to manage environment in angular) *(Since Ionic CLI 4.10.2+)* | CORDOVA_CONFIGURATION | |
| **build_flag** | An array of Xcode buildFlag. Will be appended on compile command. | CORDOVA_IOS_BUILD_FLAG | [] |
| **cordova_build_config_file** | Call `ionic cordova compile` with `--buildConfig=<ConfigFile>` to specify build config file path | CORDOVA_BUILD_CONFIG_FILE | |

Expand Down
11 changes: 11 additions & 0 deletions lib/fastlane/plugin/ionic/actions/ionic_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ def self.build(params)
args << "--buildConfig=#{Shellwords.escape(params[:cordova_build_config_file])}"
end

if !params[:configuration].to_s.empty?
args << "--configuration=#{params[:configuration]}"
end

android_args = self.get_android_args(params) if params[:platform].to_s == 'android'
ios_args = self.get_ios_args(params) if params[:platform].to_s == 'ios'

Expand Down Expand Up @@ -280,6 +284,13 @@ def self.available_options
default_value: false,
is_string: false
),
FastlaneCore::ConfigItem.new(
key: :configuration,
env_name: "CORDOVA_CONFIGURATION",
description: "Specifies the configuration to use (for instance to manage environment in angular)",
default_value: '',
is_string: true
),
FastlaneCore::ConfigItem.new(
key: :cordova_prepare,
env_name: "CORDOVA_PREPARE",
Expand Down
2 changes: 1 addition & 1 deletion lib/fastlane/plugin/ionic/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Fastlane
module Ionic
VERSION = "0.1.0"
VERSION = "0.1.1"
end
end

0 comments on commit 610a302

Please sign in to comment.