Repository navigation
Build 1.0.0-SNAPSHOT outside releases - #29
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gradle.properties: the version becomes1.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: theversioninput defaulted to1.0.0and was passed to Gradle asORG_GRADLE_PROJECT_version. That overrodegradle.propertiesin every CI build, so CI built1.0.0artifacts. Now:ORG_GRADLE_PROJECT_versiononly when a version is passed, which only the release workflow does. An empty variable would give Gradle an empty version.jonoffcpu-agent/README.md: the Maven coordinates, the build output path and the-javaagentexample refer to the version ingradle.propertiesinstead of hardcoding1.0.0.Nothing else hardcodes the version:
jonoffcpu-agent-*.jarand excludes the-plainJARs.Verification
./gradlew spotlessCheck :jonoffcpu-agent:check :jonoffcpu-correlator:check :jonoffcpu-jfr-converter:check :jonoffcpu-capture-codec:checkpasses and producesjonoffcpu-*-1.0.0-SNAPSHOT.jar.actionlintandzizmor(online audits) report no findings.