File tree Expand file tree Collapse file tree 4 files changed +48
-4
lines changed
Expand file tree Collapse file tree 4 files changed +48
-4
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -e
4+
5+ desired=" $1 "
6+ pattern=' ^v[0-9]\+\.[0-9]\.[0-9]\+$'
7+ if echo " $desired " | grep -v " $pattern " > /dev/null 2>&1 ; then
8+ >&2 echo " Specified version \" $desired \" does not match the grep pattern $pattern "
9+ exit 1
10+ fi
11+
12+ scratch=$( mktemp -d)
13+ version_cpp=" $( dirname " $0 " ) /../src/datadog/version.cpp"
14+ cp " $version_cpp " " $scratch "
15+ cp " ${version_cpp% .cpp} .h" " $scratch "
16+ > " $scratch /print_version.cpp" cat << 'END_CPP '
17+
18+ #include "version.h"
19+ #include <iostream>
20+
21+ int main() {
22+ std::cout << datadog::tracing::tracer_version;
23+ }
24+ END_CPP
25+
26+ /usr/bin/c++ -o " $scratch /print_version" " $scratch " /* .cpp
27+ actual=$( " $scratch /print_version" )
28+ rm -r " $scratch "
29+
30+ if [ " $actual " != " $desired " ]; then
31+ version_cpp=" $( realpath --relative-to=" $( pwd) " " $version_cpp " ) "
32+ >&2 echo " Desired release version \" $desired \" is different from that in $version_cpp : \" $actual \" "
33+ exit 1
34+ fi
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -e
4+
5+ version=" $1 "
6+ bin=" $( dirname " $0 " ) "
7+ " $bin " /check-version " $version " || exit
8+ gh release create " $version " --prerelease --draft
Original file line number Diff line number Diff line change 33namespace datadog {
44namespace tracing {
55
6- const char * const tracer_version = " v0.1.5" ;
7- const char * const tracer_version_string = " [dd-trace-cpp version v0.1.5]" ;
6+ #define VERSION " v0.1.8"
7+
8+ const char * const tracer_version = VERSION;
9+ const char * const tracer_version_string = " [dd-trace-cpp version " VERSION " ]" ;
810
911} // namespace tracing
1012} // namespace datadog
Original file line number Diff line number Diff line change 22
33// This component provides the release version of this library.
44
5- #include " string_view.h"
6-
75namespace datadog {
86namespace tracing {
97
108// The release version at or before this code revision, e.g. "v0.1.1".
9+ // That is, this code is at least as recent as `tracer_version`, but may be
10+ // more recent.
1111extern const char *const tracer_version;
1212
1313// A string literal that contains `tracer_version` but also is easier to `grep`
You can’t perform that action at this time.
0 commit comments