diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml index 13a55c2..98424a5 100644 --- a/.github/workflows/homebrew.yml +++ b/.github/workflows/homebrew.yml @@ -15,6 +15,10 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ inputs.tag_name }} + - name: Update the CLI version + run: echo "public let cliVersion = \"${CLI_VERSION}\"" > Sources/MVTCLI/Version.swift + env: + CLI_VERSION: ${{ inputs.tag_name }} - name: Build the executable for release run: swift build -c release --arch arm64 --arch x86_64 --product mvt - name: Compress the archive diff --git a/Sources/MVTCLI/CLI.swift b/Sources/MVTCLI/CLI.swift index 899a960..fbfd871 100644 --- a/Sources/MVTCLI/CLI.swift +++ b/Sources/MVTCLI/CLI.swift @@ -11,7 +11,7 @@ struct CLI: AsyncParsableCommand { static let configuration = CommandConfiguration( commandName: "mvt", abstract: "A utility for inspecting and working with vector tiles.", - version: "1.5.0", + version: cliVersion, subcommands: [Dump.self, Info.self, Merge.self, Query.self, Export.self, Import.self], defaultSubcommand: Dump.self) diff --git a/Sources/MVTCLI/Version.swift b/Sources/MVTCLI/Version.swift new file mode 100644 index 0000000..03a16fe --- /dev/null +++ b/Sources/MVTCLI/Version.swift @@ -0,0 +1 @@ +public let cliVersion = "v1.7.0"