Skip to content

Commit f9eeb0d

Browse files
fix(sdk): Update version information (#232)
- Fixes error in version information with `--version` flag - Lets release-please properly update the version info
1 parent eb25205 commit f9eeb0d

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

cmdline/src/main/java/io/opentdf/platform/Command.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,23 @@
4545
import java.util.concurrent.ExecutionException;
4646
import java.util.function.Consumer;
4747

48+
/**
49+
* Constants for the TDF command line tool.
50+
* These must be compile-time constants to appear in annotations.
51+
*/
52+
class Versions {
53+
// Version of the SDK, managed by release-please.
54+
public static final String SDK = "0.7.6"; // x-release-please-version
55+
56+
// This sdk aims to support this version of the TDF spec; currently 4.3.0.
57+
public static final String TDF_SPEC = "4.3.0";
58+
}
59+
4860
@CommandLine.Command(
4961
name = "tdf",
5062
subcommands = {HelpCommand.class},
51-
version = "{\"version\":\"0.7.5\",\"tdfSpecVersion\":\"4.3.0\"}"
63+
version =
64+
"{\"version\":\"" + Versions.SDK + "\",\"tdfSpecVersion\":\"" + Versions.TDF_SPEC + "\"}"
5265
)
5366
class Command {
5467

release-please.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@
88
"group-pull-request-title-pattern": "chore(${branch}): release ${version}",
99
"packages": {
1010
".": {}
11-
}
12-
}
11+
},
12+
"extra-files": [
13+
{
14+
"type": "generic",
15+
"path": "cmdline/src/main/java/io/opentdf/platform/Command.java"
16+
}
17+
]
18+
}

0 commit comments

Comments
 (0)