Description
Currently the hensu-server native image always reports hensu-server 0.1.0-SNAPSHOT in its Quarkus startup banner, regardless of which GitHub release tag (e.g. server/v0.1.0-beta.1) the artifact was built
from. Make the binary's reported version match the release tag so downloads from the GitHub Releases page are self-identifying.
Scope
- Build: In root
build.gradle.kts:11, replace the literal version = "0.1.0-SNAPSHOT" with a parameterized read using a distinct property name (e.g. findProperty("releaseVersion")?.toString() ?: "0.1.0-SNAPSHOT"). A distinct name is required because Gradle's project.version defaults to "unspecified", which would bypass an elvis fallback on findProperty("version").
- CI: In
.github/workflows/release-server.yml (resolve-version step at lines 23–34 already exports $VERSION from a server/v* tag), append -PreleaseVersion=$VERSION to the existing native build
invocation. Do not introduce a new tag-parsing regex.
- Runtime: No code change required. Quarkus' default startup banner already interpolates
quarkus.application.version, which the Quarkus Gradle plugin auto-populates from the project version. Skip any
@ConfigProperty injection or IVersionProvider work.
Acceptance criteria
- Local
./gradlew :hensu-server:quarkusDev (no -PreleaseVersion) still prints hensu-server 0.1.0-SNAPSHOT.
- A release build with
-PreleaseVersion=0.1.0-beta.1 prints hensu-server 0.1.0-beta.1 in the banner.
- Native image produced by
release-server.yml for tag server/v0.1.0-beta.1 reports 0.1.0-beta.1 on startup.
- No new reflection, classpath scanning, or runtime config lookups introduced (native-safety invariants preserved).
Out of scope
- Adding a dedicated
--version CLI subcommand.
- Changing the GitHub release tag naming convention.
- Native-image integration tests (tracked separately; see
README.md:319).
Description
Currently the
hensu-servernative image always reportshensu-server 0.1.0-SNAPSHOTin its Quarkus startup banner, regardless of which GitHub release tag (e.g.server/v0.1.0-beta.1) the artifact was builtfrom. Make the binary's reported version match the release tag so downloads from the GitHub Releases page are self-identifying.
Scope
build.gradle.kts:11, replace the literalversion = "0.1.0-SNAPSHOT"with a parameterized read using a distinct property name (e.g.findProperty("releaseVersion")?.toString() ?: "0.1.0-SNAPSHOT"). A distinct name is required because Gradle'sproject.versiondefaults to"unspecified", which would bypass an elvis fallback onfindProperty("version")..github/workflows/release-server.yml(resolve-version step at lines 23–34 already exports$VERSIONfrom aserver/v*tag), append-PreleaseVersion=$VERSIONto the existing native buildinvocation. Do not introduce a new tag-parsing regex.
quarkus.application.version, which the Quarkus Gradle plugin auto-populates from the project version. Skip any@ConfigPropertyinjection orIVersionProviderwork.Acceptance criteria
./gradlew :hensu-server:quarkusDev(no-PreleaseVersion) still printshensu-server 0.1.0-SNAPSHOT.-PreleaseVersion=0.1.0-beta.1printshensu-server 0.1.0-beta.1in the banner.release-server.ymlfor tagserver/v0.1.0-beta.1reports0.1.0-beta.1on startup.Out of scope
--versionCLI subcommand.README.md:319).