-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version bump for 1.1.1 and version check scripts enforced by CI (#113)
- Loading branch information
Showing
4 changed files
with
55 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <datadog/version.h> | ||
|
||
#include <iostream> | ||
|
||
int main() { | ||
std::cout << datadog::version::tracer_version << std::endl; | ||
return 0; | ||
} |
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,43 @@ | ||
#!/bin/bash | ||
|
||
if ! cd "${0%/*}"; then | ||
echo "failed to change working directory" | ||
exit 1 | ||
fi | ||
|
||
if ! type git > /dev/null; then | ||
echo "git not available." | ||
exit 0 | ||
fi | ||
|
||
if ! type g++ > /dev/null; then | ||
echo "g++ not available." | ||
exit 0 | ||
fi | ||
|
||
if ! g++ -I"$(git rev-parse --show-toplevel)"/include -o current_version current_version.cc; then | ||
echo "failed to compile current_version.cc" | ||
exit 1 | ||
fi | ||
if ! version=$(./current_version); then | ||
echo "failed to execute current_version" | ||
exit 1 | ||
fi | ||
if ! [[ "$version" ]]; then | ||
echo "empty version info" | ||
exit 1 | ||
fi | ||
rm ./current_version | ||
|
||
if ! git rev-parse "$version" &>/dev/null; then | ||
# already updated | ||
exit 0 | ||
fi | ||
|
||
head_ts=$(git show -s --format=%ct HEAD) | ||
vers_ts=$(git show -s --format=%ct "$version") | ||
|
||
if ((head_ts > vers_ts)); then | ||
echo "version tag is outdated and needs an update" | ||
exit 1 | ||
fi |