Skip to content

Commit

Permalink
Add --no-resources option (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz authored May 2, 2020
1 parent f905420 commit c3a1211
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Which will produce:
| **cordova_prepare** | Specifies whether to run `ionic cordova prepare` before building | CORDOVA_PREPARE | *true* |
| **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* |
| **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
16 changes: 11 additions & 5 deletions lib/fastlane/plugin/ionic/actions/ionic_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,11 @@ def self.get_ios_args(params)
# add platform if missing (run step #1)
def self.check_platform(params)
platform = params[:platform]
args = []
args << '--nofetch' if params[:cordova_no_fetch]
args << '--no-resources' if params[:cordova_no_resources]
if platform && !File.directory?("./platforms/#{platform}")
if params[:cordova_no_fetch]
sh "ionic cordova platform add #{platform} --no-interactive --nofetch"
else
sh "ionic cordova platform add #{platform} --no-interactive"
end
sh "ionic cordova platform add #{platform} --no-interactive #{args.join(' ')}"
end
end

Expand Down Expand Up @@ -291,6 +290,13 @@ def self.available_options
default_value: false,
is_string: false
),
FastlaneCore::ConfigItem.new(
key: :cordova_no_resources,
env_name: "CORDOVA_NO_RESOURCES",
description: "Call `cordova platform add` with `--no-resources` parameter",
default_value: false,
is_string: false
),
FastlaneCore::ConfigItem.new(
key: :build_flag,
env_name: "CORDOVA_IOS_BUILD_FLAG",
Expand Down

0 comments on commit c3a1211

Please sign in to comment.