wip
This commit is contained in:
@@ -22,7 +22,7 @@ struct GenerateVersionBuildPlugin: BuildToolPlugin {
|
|||||||
.buildCommand(
|
.buildCommand(
|
||||||
displayName: "Build With Version",
|
displayName: "Build With Version",
|
||||||
executable: tool.path,
|
executable: tool.path,
|
||||||
arguments: ["build", "--git-directory", gitDirectoryPath.string, outputPath.string],
|
arguments: ["build", "--verbose", "--git-directory", gitDirectoryPath.string, outputPath.string],
|
||||||
environment: [:],
|
environment: [:],
|
||||||
inputFiles: target.sourceFiles.map(\.path),
|
inputFiles: target.sourceFiles.map(\.path),
|
||||||
outputFiles: [outputFile]
|
outputFiles: [outputFile]
|
||||||
|
|||||||
@@ -9,10 +9,7 @@ extension GitVersionCommand {
|
|||||||
abstract: "Used for the build with version plugin."
|
abstract: "Used for the build with version plugin."
|
||||||
)
|
)
|
||||||
|
|
||||||
// @OptionGroup var shared: SharedOptions
|
@OptionGroup var shared: SharedOptions
|
||||||
|
|
||||||
@Argument(help: "The output file path.")
|
|
||||||
var outputPath: String
|
|
||||||
|
|
||||||
@Option(
|
@Option(
|
||||||
name: .customLong("git-directory"),
|
name: .customLong("git-directory"),
|
||||||
@@ -32,8 +29,8 @@ extension GitVersionCommand {
|
|||||||
|
|
||||||
logger.info("Building with git-directory: \(gitDirectory)")
|
logger.info("Building with git-directory: \(gitDirectory)")
|
||||||
|
|
||||||
let fileUrl = URL(fileURLWithPath: outputPath)
|
let fileUrl = URL(fileURLWithPath: shared.target)
|
||||||
.appendingPathComponent("Version.swift")
|
.appendingPathComponent(shared.fileName)
|
||||||
|
|
||||||
let fileString = fileUrl.fileString()
|
let fileString = fileUrl.fileString()
|
||||||
logger.info("File Url: \(fileString)")
|
logger.info("File Url: \(fileString)")
|
||||||
|
|||||||
Reference in New Issue
Block a user