Skip to content

Build 1.0.0-SNAPSHOT outside releases - #29

Merged
lhotari merged 1 commit into
mainfrom
snapshot-version
Sep 24, 2026
Merged

lhotari merged 1 commit into
mainfrom
snapshot-version

Conversation

@lhotari

@lhotari lhotari commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • gradle.properties: the version becomes 1.0.0-SNAPSHOT, so a local build and its locally published snapshot can never be mistaken for the 1.0.0 release.
  • build-and-verify.yml: the version input defaulted to 1.0.0 and was passed to Gradle as ORG_GRADLE_PROJECT_version. That overrode gradle.properties in every CI build, so CI built 1.0.0 artifacts. Now:
    • The input defaults to empty.
    • A first step in both jobs exports ORG_GRADLE_PROJECT_version only when a version is passed, which only the release workflow does. An empty variable would give Gradle an empty version.
    • CI builds now use the snapshot version, and a release tag still builds its own version.
  • jonoffcpu-agent/README.md: the Maven coordinates, the build output path and the -javaagent example refer to the version in gradle.properties instead of hardcoding 1.0.0.

Nothing else hardcodes the version:

  • CI's packaging step matches jonoffcpu-agent-*.jar and excludes the -plain JARs.
  • The release jobs pass the tag's version explicitly.
  • The root README shows only released versions, which the release workflow updates.

Verification

  • ./gradlew spotlessCheck :jonoffcpu-agent:check :jonoffcpu-correlator:check :jonoffcpu-jfr-converter:check :jonoffcpu-capture-codec:check passes and produces jonoffcpu-*-1.0.0-SNAPSHOT.jar.
  • actionlint and zizmor (online audits) report no findings.

The version in gradle.properties becomes 1.0.0-SNAPSHOT, so a local or
CI build can never be mistaken for the 1.0.0 release. The reusable
build workflow defaulted its version input to 1.0.0 and passed it as
ORG_GRADLE_PROJECT_version, which overrode gradle.properties in every
CI build; the input now defaults to empty, and the version is exported
only when a release passes one, since an empty variable would set an
empty version. The agent README names the version by reference to
gradle.properties instead of hardcoding it.
@lhotari lhotari added the maintenance Build, CI, dependency and other maintenance changes label Sep 24, 2026
@lhotari
lhotari merged commit b104068 into main Sep 24, 2026
7 checks passed
@lhotari
lhotari deleted the snapshot-version branch September 24, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Build, CI, dependency and other maintenance changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant