-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'marco-ippolito-feat/include-version-header'
- Loading branch information
Showing
5 changed files
with
55 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,3 +53,4 @@ test/perftest | |
debug | ||
cmake-build-debug | ||
/build-afl | ||
.vscode |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @file hdr_histogram_version.h | ||
* @brief Definitions for HdrHistogram's version number. | ||
*/ | ||
|
||
#ifndef HDR_HISTOGRAM_VERSION_H | ||
#define HDR_HISTOGRAM_VERSION_H | ||
|
||
#define HDR_HISTOGRAM_VERSION "0.11.7" | ||
|
||
#endif // HDR_HISTOGRAM_VERSION_H |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
set -e | ||
# Shell script to update HDR_HISTOGRAM_VERSION_H to a specific version | ||
|
||
BASE_DIR=$(cd "$(dirname "$0")/.." && pwd) | ||
HDR_DIR="$BASE_DIR/include/hdr" | ||
HDR_HISTOGRAM_VERSION_H=$HDR_DIR/hdr_histogram_version.h | ||
NEW_VERSION=$1 | ||
|
||
if [ "$#" -le 0 ]; then | ||
echo "Error: please provide a version to update to" | ||
exit 1 | ||
fi | ||
|
||
CURRENT_VERSION=$(grep "#define HDR_HISTOGRAM_VERSION_H" $HDR_HISTOGRAM_VERSION_H | sed -n "s/^.*VERSION_H \"\(.*\)\"/\1/p") | ||
|
||
echo "Comparing $NEW_VERSION with $CURRENT_VERSION" | ||
|
||
if [ "$NEW_VERSION" = "$CURRENT_VERSION" ]; then | ||
echo "Skipped because is already on the latest version." | ||
exit 0 | ||
fi | ||
|
||
echo "Replacing $CURRENT_VERSION with new version $NEW_VERSION" | ||
|
||
sed -i '' -e "s/#define HDR_HISTOGRAM_VERSION_H \"$CURRENT_VERSION\"/#define HDR_HISTOGRAM_VERSION_H \"$NEW_VERSION\"/g" $HDR_HISTOGRAM_VERSION_H | ||
|
||
echo "All done!" | ||
|
||
echo "NEW_VERSION=$NEW_VERSION" |