Skip to content

Extract prerelease/build information from package semver#6839

Merged
mjjbell merged 2 commits intoProject-OSRM:masterfrom
mjjbell:mbell/extract_prerelease_build_label
Mar 24, 2024
Merged

Extract prerelease/build information from package semver#6839
mjjbell merged 2 commits intoProject-OSRM:masterfrom
mjjbell:mbell/extract_prerelease_build_label

Conversation

@mjjbell
Copy link
Copy Markdown
Member

@mjjbell mjjbell commented Mar 24, 2024

Issue

Currently we only extract the major.minor.patch identifiers from the semver label stored in package.json.

This leads to version information in executables incorrectly reporting a release version is running on prereleases and special builds.

This commit is a quickfix to extract this information and report it in version strings.

$ ./osrm-extract --version
v5.28.0-unreleased

$ ./osrm-routed ../../osrm-data/greater-london/greater-london-latest.osm.pbf 
[2024-03-24T14:17:30.149149270] [info] starting up engines, v5.28.0-unreleased
[2024-03-24T14:17:30.149236196] [info] Threads: 12
[2024-03-24T14:17:30.149250498] [info] IP address: 0.0.0.0
[2024-03-24T14:17:30.149260265] [info] IP port: 5000
[2024-03-24T14:17:30.149269842] [info] Keepalive timeout: 5
...

CMake regex parsing is not sophisticated enough to handle the full semver regex, so we might need to explore other CMake modules if we want to strictly parse the label.

Tasklist

Requirements / Relations

Fixes #6767

Currently we only extract the major.minor.patch identifiers from
the semver label stored in package.json.

This leads to version information in executables to incorrectly
report a release version is running on prereleases and special builds.

This commit is a quickfix to extract this information and report it
in version strings.

CMake regex parsing is not sophisticated enough to handle the full semver
regex, so we might need to explore other CMake modules if we want to
strictly parse the label.
Copy link
Copy Markdown
Collaborator

@DennisOSRM DennisOSRM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

@mjjbell mjjbell force-pushed the mbell/extract_prerelease_build_label branch from 1d1be16 to 83671f3 Compare March 24, 2024 16:33
@mjjbell mjjbell merged commit d0e3e2a into Project-OSRM:master Mar 24, 2024
eliseier pushed a commit to wanderlog/osrm-backend that referenced this pull request Mar 25, 2025
…M#6839)

* Extract prerelease/build information from package semver

Currently we only extract the major.minor.patch identifiers from
the semver label stored in package.json.

This leads to version information in executables incorrectly
reporting a release version is running on prereleases and special builds.

This commit is a quickfix to extract this information and report it
in version strings.

CMake regex parsing is not sophisticated enough to handle the full semver
regex, so we might need to explore other CMake modules if we want to
strictly parse the label.
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.

Docker not up to date

2 participants