Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action][spm] deprecate build_path option in favor of scratch_path, as recommended by Swift CLI #20814

Merged
merged 4 commits into from Dec 13, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion fastlane/lib/fastlane/actions/spm.rb
Expand Up @@ -5,6 +5,7 @@ def self.run(params)
cmd = ["swift"]

cmd << (package_commands.include?(params[:command]) ? "package" : params[:command])
cmd << "--scratch-path #{params[:scratch_path]}" if params[:scratch_path]
cmd << "--build-path #{params[:build_path]}" if params[:build_path]
cmd << "--package-path #{params[:package_path]}" if params[:package_path]
cmd << "--configuration #{params[:configuration]}" if params[:configuration]
Expand Down Expand Up @@ -50,9 +51,14 @@ def self.available_options
description: "Enables code coverage for the generated Xcode project when using the 'generate-xcodeproj' and the 'test' command",
type: Boolean,
optional: true),
FastlaneCore::ConfigItem.new(key: :scratch_path,
env_name: "FL_SPM_SCRATCH_PATH",
description: "Specify build/cache directory [default: ./.build]",
optional: true),
FastlaneCore::ConfigItem.new(key: :build_path,
env_name: "FL_SPM_BUILD_PATH",
description: "Specify build/cache directory [default: ./.build]",
deprecated: "`build_path` option is deprecated, use `scratch_path` instead",
optional: true),
FastlaneCore::ConfigItem.new(key: :package_path,
env_name: "FL_SPM_PACKAGE_PATH",
Expand Down Expand Up @@ -110,7 +116,7 @@ def self.example_code
'spm',
'spm(
command: "build",
build_path: "./build",
scratch_path: "./build",
configuration: "release"
)',
'spm(
Expand Down