wip
This commit is contained in:
@@ -8,9 +8,16 @@ struct GenerateVersionBuildPlugin: BuildToolPlugin {
|
|||||||
target: PackagePlugin.Target
|
target: PackagePlugin.Target
|
||||||
) async throws -> [PackagePlugin.Command] {
|
) async throws -> [PackagePlugin.Command] {
|
||||||
guard let target = target as? SourceModuleTarget else { return [] }
|
guard let target = target as? SourceModuleTarget else { return [] }
|
||||||
let outputPath = context.pluginWorkDirectory
|
|
||||||
let tool = try context.tool(named: "git-version")
|
let tool = try context.tool(named: "git-version")
|
||||||
|
let outputPath = context.pluginWorkDirectory.appending("Version")
|
||||||
|
|
||||||
|
try FileManager.default.createDirectory(
|
||||||
|
atPath: outputPath.string,
|
||||||
|
withIntermediateDirectories: true
|
||||||
|
)
|
||||||
|
|
||||||
let outputFile = outputPath.appending(subpath: "Version.swift")
|
let outputFile = outputPath.appending(subpath: "Version.swift")
|
||||||
|
|
||||||
return [
|
return [
|
||||||
.buildCommand(
|
.buildCommand(
|
||||||
displayName: "Build With Version",
|
displayName: "Build With Version",
|
||||||
|
|||||||
Reference in New Issue
Block a user