Skip to content

chore(ENGKNOW-3966): remove VERSION file, derive version from git tags - #148

Merged
gmagnu merged 1 commit into
mainfrom
ENGKNOW-3966-remove-version-file-from-gor
Oct 1, 2026
Merged

gmagnu merged 1 commit into
mainfrom
ENGKNOW-3966-remove-version-file-from-gor

Conversation

@gmagnu

@gmagnu gmagnu commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Jira: ENGKNOW-3966

Removes the VERSION file, same approach as gor-services (ENGKNOW-3884, GeneDx/gdb-gor-services#104).

The VERSION file was stale: it said 5.12.0 while v5.13.1 is the latest release. So tag builds published the wrong version (publishVersion used -Pversion=$(cat VERSION)).

Changes

  • Versioning: delete VERSION. The me.qoomon.git-versioning gradle plugin now derives the version from vX.Y.Z tags:
    • a tag checkout builds X.Y.Z
    • any other commit builds <latest tag>-SNAPSHOT
    • a shallow clone without tags falls back to 0.0.0-SNAPSHOT with a warning
    • -Pversion=... still overrides it
    • new printVersion task / make gitversion prints it
  • CI (build.yml): gradle jobs use fetch-depth: 0. Publish jobs no longer pass -Pversion, have least-privilege permissions, and the tag job checks that the gradle version matches the tag before publishing. Also fixed the swapped "snapshot"/"release" step names.
  • grgit → git rev-parse HEAD for the manifest Git-SHA (grgit returns null in git worktrees, which broke the build).
  • Cleanup: remove the dead release Makefile targets, release_milestone_from_master.sh, version.sh and the unused .gitlab-ci.yml (GitLab builds have been off since Dec 2024). Rewrite the release docs in CONTRIBUTING.md and the versioning notes in CLAUDE.md.

No release workflow / commitizen as in gor-services: gorpipe/gor has no tag rulesets or devops-ci-bot secrets, so releases are still created as a vX.Y.Z release/tag on main in the GitHub UI.

Testing

  • ./gradlew -q printVersion → 5.14.0-SNAPSHOT on branch (the latest local tag). With -Pversion=1.2.3 → 1.2.3.
  • A clone checked out at tag v5.13.1 → 5.13.1.
  • Jar manifest: Implementation-Version: 5.14.0-SNAPSHOT (git SHA …), Git-SHA set.
  • ./gradlew assemble test: all pass except 3 UTestOCIObjectStorageSourceType tests. These fail locally with "Missing credentials, can not create simple OCI auth" because they need the CI secrets.

Note: after merge, main snapshots are 5.13.1-SNAPSHOT (latest tag on GitHub). Before, they were 5.12.0-SNAPSHOT.

🤖 Generated with Claude Code

Same approach as gor-services (ENGKNOW-3884).  The VERSION file was stale
(5.12.0 while v5.13.1 is released), so tag builds published the wrong
version.

- Remove the VERSION file; the gradle git-versioning plugin derives the
  version from tags (tag checkout -> X.Y.Z, otherwise <tag>-SNAPSHOT) with
  a 0.0.0-SNAPSHOT fallback for shallow clones.  -Pversion still overrides.
  Add printVersion task.
- CI: fetch-depth 0 for gradle jobs, no -Pversion when publishing, check
  the version matches the tag before publishing a release, least-privilege
  permissions for the publish jobs.
- Replace grgit with git rev-parse for the manifest git SHA (grgit fails
  in git worktrees).
- Remove dead release Makefile targets and scripts, and the unused
  .gitlab-ci.yml.  Rewrite release docs in CONTRIBUTING.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Junit Tests - Summary

4 909 tests  ±0   4 737 ✅  - 1   21m 25s ⏱️ + 3m 55s
  509 suites ±0     172 💤 +1 
  509 files   ±0       0 ❌ ±0 

Results for commit f15e8a5. ± Comparison against base commit 7747203.

@gmagnu
gmagnu merged commit b79342b into main Oct 1, 2026
14 checks passed
@gmagnu
gmagnu deleted the ENGKNOW-3966-remove-version-file-from-gor branch October 1, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant