Skip to content

Commit

Permalink
Add Support for XCFrameworks (#18)
Browse files Browse the repository at this point in the history
* Added support for the '--use-xcframeworks' option

* Updated readme.md

* Bumped version to 0.3.9

Co-authored-by: Artur Davletshin <[email protected]>
  • Loading branch information
originalWho and Artur Davletshin authored Nov 22, 2021
1 parent 9536ce7 commit 28e8e73
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ rome(
frameworks: ["MyFramework1", "MyFramework2"], # Specify which frameworks to upload or download
command: "upload", # One of: download, upload, list
verbose: false, # Print rome output inline
platform: "all", # Define which platform to build for (one of ‘all’, ‘Mac’, ‘iOS’, ‘watchOS’, ‘tvOS‘, or comma-separated values of the formers except for ‘all’)
platform: "all", # Define which platform to build for (one of ‘all’, ‘Mac’, ‘iOS’, ‘watchOS’, ‘tvOS‘, or comma-separated values of the formers except for ‘all’). Can't be combined with the 'usexcframeworks' option
cacheprefix: "Swift_4_2_1", # A prefix appended to the top level directories inside the caches. Useful to separate artifacts between Swift versions
romefile: "~/Code/", # The path to the Romefile to use. Defaults to the \"Romefile\" in the current directory
noignore: "true", # Ignore the `ignoreMap` section in the Romefile when performing the operation
concurrently: "true", # Maximise concurrency while performing the operation. Might make verbose output hard to follow
usexcframeworks: "true" # Search for .xcframeworks when performing the upload or download operation. Can't be combined with the 'platform' option
)
```

Expand Down
24 changes: 22 additions & 2 deletions lib/fastlane/plugin/rome/actions/rome_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def self.run(params)
cmd << "--no-ignore" if params[:noignore] == true
cmd << "--no-skip-current" if params[:noskipcurrent] == true
cmd << "--concurrently" if params[:concurrently] == true
cmd << "--use-xcframeworks" if params[:usexcframeworks] == true
cmd << "-v " if params[:verbose]

return Actions.sh(cmd.join(' '))
Expand Down Expand Up @@ -110,7 +111,17 @@ def self.validate(params)
UI.user_error!("'concurrently' option requires Rome version '0.20.0.56' or later") if !meet_minimum_version(binary_path, "0.20.0.56")
end

if command_name == "list" && params[:concurrently] != nil
usexcframeworks = params[:usexcframeworks]
if usexcframeworks != nil
UI.user_error!("'usexcframeworks' option requires Rome version '0.24.0.65' or later") if !meet_minimum_version(binary_path, "0.24.0.65")
end

platform = params[:platform]
if usexcframeworks != nil && platform != nil
UI.user_error!("'usexcframeworks' option cannot be combined with 'platform' option. Only one of them can be provided.")
end

if command_name == "list" && concurrently != nil
UI.user_error!("Concurrently option is only avalable with download or upload. Listing is performed concurrently by default.")
end
end
Expand Down Expand Up @@ -233,12 +244,21 @@ def self.available_options
verify_block: proc do |value|
UI.user_error!("Please pass a valid value for noskipcurrent. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
end),

FastlaneCore::ConfigItem.new(key: :concurrently,
env_name: "FL_ROME_CONCURRENTLY",
description: "Maximize concurrency while performing the operation. Not needed for listing",
is_string: false,
optional: true,
verify_block: proc do |value|
UI.user_error!("Please pass a valid value for concurrently. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
end),

FastlaneCore::ConfigItem.new(key: :usexcframeworks,
env_name: "FL_ROME_USEXCFRAMEWORKS",
description: "Search for .xcframeworks when performing the operation. Not needed for listing",
is_string: false,
optional: true,
verify_block: proc do |value|
UI.user_error!("Please pass a valid value for concurrently. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
end)
Expand Down
2 changes: 1 addition & 1 deletion lib/fastlane/plugin/rome/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Fastlane
module Rome
VERSION = "0.3.8"
VERSION = "0.3.9"
end
end

0 comments on commit 28e8e73

Please sign in to comment.