From 681c078833947cc2f87af755518c82d9a59d096b Mon Sep 17 00:00:00 2001 From: David Mihalcik Date: Wed, 2 Apr 2025 13:59:38 -0400 Subject: [PATCH] fix(sdk): Update version information - Fixes error in version information with `--version` flag - Lets release-please properly update the version info --- .../main/java/io/opentdf/platform/Command.java | 15 ++++++++++++++- release-please.json | 10 ++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/cmdline/src/main/java/io/opentdf/platform/Command.java b/cmdline/src/main/java/io/opentdf/platform/Command.java index a739c600..49b4e565 100644 --- a/cmdline/src/main/java/io/opentdf/platform/Command.java +++ b/cmdline/src/main/java/io/opentdf/platform/Command.java @@ -45,10 +45,23 @@ import java.util.concurrent.ExecutionException; import java.util.function.Consumer; +/** + * Constants for the TDF command line tool. + * These must be compile-time constants to appear in annotations. + */ +class Versions { + // Version of the SDK, managed by release-please. + public static final String SDK = "0.7.6"; // x-release-please-version + + // This sdk aims to support this version of the TDF spec; currently 4.3.0. + public static final String TDF_SPEC = "4.3.0"; +} + @CommandLine.Command( name = "tdf", subcommands = {HelpCommand.class}, - version = "{\"version\":\"0.7.5\",\"tdfSpecVersion\":\"4.3.0\"}" + version = + "{\"version\":\"" + Versions.SDK + "\",\"tdfSpecVersion\":\"" + Versions.TDF_SPEC + "\"}" ) class Command { diff --git a/release-please.json b/release-please.json index aaa7732d..78f10bf8 100644 --- a/release-please.json +++ b/release-please.json @@ -8,5 +8,11 @@ "group-pull-request-title-pattern": "chore(${branch}): release ${version}", "packages": { ".": {} - } -} \ No newline at end of file + }, + "extra-files": [ + { + "type": "generic", + "path": "cmdline/src/main/java/io/opentdf/platform/Command.java" + } + ] +}