Skip to content

feat(release): embed semantic version in map2check --version#51

Merged
hbgit merged 1 commit into
masterfrom
develop
Jul 7, 2026
Merged

feat(release): embed semantic version in map2check --version#51
hbgit merged 1 commit into
masterfrom
develop

Conversation

@hbgit

@hbgit hbgit commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Replace the hardcoded Map2CheckVersion #define in map2check.cpp with a header generated by CMake configure_file (map2check_version.hpp.in). The string follows v-Songbirds: (date -u +%Y-%m-%d):

  • default: PROJECT_VERSION from the root CMakeLists (local/CI builds)
  • release: overridden with -DMAP2CHECK_VERSION=

Since the version only exists after semantic-release analyzes the commits, the Docker build moves from a workflow step into the prepare phase: .releaserc.json now calls scripts/prepare-release.sh, which builds inside map2check-dev with the computed version and then invokes scripts/package-release.sh. Side benefit: pushes with no release-worthy commits skip the ~40 min build entirely.

Description

Please include a summary of the your pull request. Please also include relevant motivation and context. List any dependencies that are required for this change.

Your checklist for this pull request

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against the canary branch (left side). Also you should start your branch off our canary.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will fail neither code linting checks nor unit test.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Thank you!

Replace the hardcoded Map2CheckVersion #define in map2check.cpp with a
header generated by CMake configure_file (map2check_version.hpp.in).
The string follows v<version>-Songbirds:<UTC date> (date -u +%Y-%m-%d):
- default: PROJECT_VERSION from the root CMakeLists (local/CI builds)
- release: overridden with -DMAP2CHECK_VERSION=<semver>

Since the version only exists after semantic-release analyzes the
commits, the Docker build moves from a workflow step into the prepare
phase: .releaserc.json now calls scripts/prepare-release.sh, which
builds inside map2check-dev with the computed version and then invokes
scripts/package-release.sh. Side benefit: pushes with no release-worthy
commits skip the ~40 min build entirely.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hbgit hbgit merged commit dc61b92 into master Jul 7, 2026
10 checks passed
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