From b557a60fa3c4ff6debaba6af2bde83e4e16341f3 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Fri, 13 Dec 2024 08:19:36 -0500 Subject: [PATCH] feat: Adds build-with-version plugin. --- Package.resolved | 11 ++++++++++- Package.swift | 4 ++++ Sources/hpa/Application.swift | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Package.resolved b/Package.resolved index de39a6f..2aa9f9a 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "57500b96c3cc5835f23b47b8fdf0a0f69711487d67b69c5ab659837d02308a93", + "originHash" : "a3b90cdeec7e11e73a0a47c1f8dffa472c22f0c6385282eb11096210e3e7ad8b", "pins" : [ { "identity" : "combine-schedulers", @@ -37,6 +37,15 @@ "version" : "0.2.0" } }, + { + "identity" : "swift-cli-version", + "kind" : "remoteSourceControl", + "location" : "https://github.com/m-housh/swift-cli-version.git", + "state" : { + "revision" : "1885a90f622c91ea9bf7a9b3df82831dece8eb7d", + "version" : "0.1.1" + } + }, { "identity" : "swift-clocks", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index 401d94d..17f01ca 100644 --- a/Package.swift +++ b/Package.swift @@ -17,6 +17,7 @@ let package = Package( .package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.5.2"), .package(url: "https://github.com/m-housh/swift-shell-client.git", from: "0.1.0"), .package(url: "https://git.housh.dev/michael/swift-cli-doc.git", from: "0.2.0"), + .package(url: "https://github.com/m-housh/swift-cli-version.git", from: "0.1.0"), .package(url: "https://github.com/LebJe/TOMLKit.git", from: "0.5.0") ], targets: [ @@ -30,6 +31,9 @@ let package = Package( .product(name: "CliDoc", package: "swift-cli-doc"), .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "ShellClient", package: "swift-shell-client") + ], + plugins: [ + .plugin(name: "BuildWithVersionPlugin", package: "swift-cli-version") ] ), .target( diff --git a/Sources/hpa/Application.swift b/Sources/hpa/Application.swift index ba17e65..b587f8a 100644 --- a/Sources/hpa/Application.swift +++ b/Sources/hpa/Application.swift @@ -9,6 +9,7 @@ struct Application: AsyncParsableCommand { static let configuration = CommandConfiguration( commandName: Constants.appName, abstract: createAbstract("A utility for working with ansible hpa playbook."), + version: VERSION, subcommands: [ BuildCommand.self, CreateCommand.self, VaultCommand.self, UtilsCommand.self ]