Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixHerrmann committed May 27, 2023
1 parent b74a952 commit 0ba13f0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ import XcodeProjectPlugin
extension SwiftPackageListJSONPlugin: XcodeBuildToolPlugin {
func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] {
let projectPath = context.xcodeProject.directory.appending("\(context.xcodeProject.displayName).xcodeproj")
let executable = try context.tool(named: "SwiftPackageListCommand").path.removingLastComponent().appending("swift-package-list")
let executable = try context.tool(named: "SwiftPackageListCommand").path
.removingLastComponent()
.appending("swift-package-list")
let outputPath = context.pluginWorkDirectory
let fileType = "json"
return [
.buildCommand(
displayName: "SwiftPackageListPlugin",
executable: executable,
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", "json", "--requires-license"],
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", fileType, "--requires-license"],
outputFiles: [outputPath.appending("package-list.json")]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ import XcodeProjectPlugin
extension SwiftPackageListPDFPlugin: XcodeBuildToolPlugin {
func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] {
let projectPath = context.xcodeProject.directory.appending("\(context.xcodeProject.displayName).xcodeproj")
let executable = try context.tool(named: "SwiftPackageListCommand").path.removingLastComponent().appending("swift-package-list")
let executable = try context.tool(named: "SwiftPackageListCommand").path
.removingLastComponent()
.appending("swift-package-list")
let outputPath = context.pluginWorkDirectory
let fileType = "pdf"
return [
.buildCommand(
displayName: "SwiftPackageListPlugin",
executable: executable,
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", "pdf", "--requires-license"],
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", fileType, "--requires-license"],
outputFiles: [outputPath.appending("Acknowledgements.pdf")]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ import XcodeProjectPlugin
extension SwiftPackageListPropertyListPlugin: XcodeBuildToolPlugin {
func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] {
let projectPath = context.xcodeProject.directory.appending("\(context.xcodeProject.displayName).xcodeproj")
let executable = try context.tool(named: "SwiftPackageListCommand").path.removingLastComponent().appending("swift-package-list")
let executable = try context.tool(named: "SwiftPackageListCommand").path
.removingLastComponent()
.appending("swift-package-list")
let outputPath = context.pluginWorkDirectory
let fileType = "plist"
return [
.buildCommand(
displayName: "SwiftPackageListPlugin",
executable: executable,
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", "plist", "--requires-license"],
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", fileType, "--requires-license"],
outputFiles: [outputPath.appending("package-list.plist")]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ import XcodeProjectPlugin
extension SwiftPackageListSettingsBundlePlugin: XcodeBuildToolPlugin {
func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] {
let projectPath = context.xcodeProject.directory.appending("\(context.xcodeProject.displayName).xcodeproj")
let executable = try context.tool(named: "SwiftPackageListCommand").path.removingLastComponent().appending("swift-package-list")
let executable = try context.tool(named: "SwiftPackageListCommand").path
.removingLastComponent()
.appending("swift-package-list")
let outputPath = context.pluginWorkDirectory
let fileType = "settings-bundle"
return [
.buildCommand(
displayName: "SwiftPackageListPlugin",
executable: executable,
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", "settings-bundle", "--requires-license"],
arguments: ["generate", projectPath, "--output-path", outputPath, "--file-type", fileType, "--requires-license"],
outputFiles: [outputPath.appending("Settings.bundle")]
)
]
Expand Down

0 comments on commit 0ba13f0

Please sign in to comment.