-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract prerelease/build information from package semver (#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.
- Loading branch information
Showing
3 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
#ifndef VERSION_HPP | ||
#define VERSION_HPP | ||
|
||
#define OSRM_VERSION_MAJOR @OSRM_VERSION_MAJOR@ | ||
#define OSRM_VERSION_MINOR @OSRM_VERSION_MINOR@ | ||
#define OSRM_VERSION_PATCH @OSRM_VERSION_PATCH@ | ||
#define OSRM_VERSION_MAJOR @OSRM_VERSION_MAJOR@ | ||
#define OSRM_VERSION_MINOR @OSRM_VERSION_MINOR@ | ||
#define OSRM_VERSION_PATCH @OSRM_VERSION_PATCH@ | ||
#define OSRM_VERSION_PRERELEASE_BUILD "@OSRM_VERSION_PRERELEASE_BUILD@" | ||
|
||
#define OSRM_VERSION__(A,B,C) "v" #A "." #B "." #C | ||
#define OSRM_VERSION_(A,B,C) OSRM_VERSION__(A,B,C) | ||
#define OSRM_VERSION OSRM_VERSION_(OSRM_VERSION_MAJOR, OSRM_VERSION_MINOR, OSRM_VERSION_PATCH) | ||
#define OSRM_VERSION__(A,B,C,D) "v" #A "." #B "." #C D | ||
#define OSRM_VERSION_(A,B,C,D) OSRM_VERSION__(A,B,C,D) | ||
#define OSRM_VERSION OSRM_VERSION_(OSRM_VERSION_MAJOR, OSRM_VERSION_MINOR, OSRM_VERSION_PATCH, OSRM_VERSION_PRERELEASE_BUILD) | ||
|
||
#endif // VERSION_HPP |