Skip to content

Commit 64daafb

Browse files
authored
Merge pull request #419 from allevato/plugin-inputs
Pass `SwiftFormatRules` sources as inputs to `generate-pipeline-plugin`.
2 parents 4d1086e + f3b6192 commit 64daafb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: Plugins/generate-pipeline-plugin/GeneratePipelinePlugin.swift

+5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ struct GeneratePipelinePlugin: BuildToolPlugin {
4949
.appending("GeneratedSources")
5050
.appending(generatedSourceName)
5151

52+
let rulesSources =
53+
(try context.package.targets(named: ["SwiftFormatRules"]).first as? SwiftSourceModuleTarget)?
54+
.sourceFiles.map(\.path) ?? []
55+
5256
return [
5357
.buildCommand(
5458
displayName: "Generating \(generatedSourceName) for \(target.name)",
@@ -61,6 +65,7 @@ struct GeneratePipelinePlugin: BuildToolPlugin {
6165
"--target",
6266
target.name,
6367
],
68+
inputFiles: rulesSources,
6469
outputFiles: [outputFile]
6570
)
6671
]

0 commit comments

Comments
 (0)