Skip to content

chore: Single-source version + one-command release script#2

Merged
AdirAmsalem merged 2 commits into
mainfrom
worktree-release-automation
Jun 18, 2026
Merged

chore: Single-source version + one-command release script#2
AdirAmsalem merged 2 commits into
mainfrom
worktree-release-automation

Conversation

@AdirAmsalem

Copy link
Copy Markdown
Contributor

What & why

Tightens up the release process so cutting a version is a single, safe step.

  • One source of truth for the version. <decart/version.h> is now generated from version.h.in via CMake's configure_file, driven by project(decart VERSION ...) in CMakeLists.txt. Previously the version was hand-duplicated in the header, which could silently drift from the release tag (CI only checked the CMake value). Now there's exactly one number to change and nothing can fall out of sync.
  • One-command release. scripts/release.sh X.Y.Z (run from main) bumps the version, commits, tags, and pushes — then the existing Release workflow verifies the tag matches and publishes the GitHub release. No more editing files by hand.

Releasing, going forward

scripts/release.sh 0.2.0

Verified locally: configure generates the correct version.h, the full build + unit tests pass, and the bump script only edits the project version line (shellcheck clean). No public API changes.

- Generate <decart/version.h> from version.h.in via configure_file so the
  version has one source of truth: project(VERSION) in CMakeLists.txt. Removes
  the hand-maintained header and any drift from the release tag.
- Add scripts/release.sh X.Y.Z: bump the version, commit, tag, and push from
  main; the Release workflow publishes the GitHub release on the tag.
@AdirAmsalem AdirAmsalem changed the title Single-source version + one-command release script chore: Single-source version + one-command release script Jun 18, 2026
@AdirAmsalem AdirAmsalem merged commit c47ac5b into main Jun 18, 2026
10 checks passed
@AdirAmsalem AdirAmsalem deleted the worktree-release-automation branch June 18, 2026 12:08
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