Skip to content

fix: make release version parsing portable#157

Closed
zjw1111 wants to merge 1 commit into
apache:mainfrom
zjw1111:codex/fix-release-version-parsing
Closed

fix: make release version parsing portable#157
zjw1111 wants to merge 1 commit into
apache:mainfrom
zjw1111:codex/fix-release-version-parsing

Conversation

@zjw1111

@zjw1111 zjw1111 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: N/A

Make CMake project-version parsing portable across GNU/Linux and macOS/BSD environments. The previous basic regular expressions used the GNU sed extension \+, so both release scripts returned an empty version with BSD sed. Use POSIX awk extended regular expressions instead.

PR #156 fixes an unrelated cmake-format failure already present on the current main branch. Until that PR is merged, an all-files pre-commit run also rewrites examples/CMakeLists.txt; the hooks for the files changed here pass.

Tests

  • reproduced the old empty result with sed --posix
  • parsed 0.2.3 from both the working tree and Git content with the new awk expression
  • bash -n scripts/releasing/create_source_release.sh scripts/releasing/verify_release_candidate.sh
  • scripts/releasing/create_source_release.sh --version 0.2.3 --git-ref HEAD --output-dir <temp-dir>
  • scripts/releasing/verify_release_candidate.sh --allow-unsigned --skip-rat --skip-build <artifact>
  • pre-commit run --files scripts/releasing/create_source_release.sh scripts/releasing/verify_release_candidate.sh
  • git diff --check

API and Format

No API, storage format, or protocol changes.

Documentation

No documentation changes.

Generative AI tooling

Generated-by: Codex (GPT-5)

@zjw1111

zjw1111 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #156. The portable release-version parsing commit has been moved to that PR.

@zjw1111 zjw1111 closed this Jul 24, 2026
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