8000 "go install" and other changes (#227) · DataDog/dd-opentracing-cpp@7f3baff · GitHub
[go: up one dir, main page]

Skip to content

Commit 7f3baff

Browse files
authored
"go install" and other changes (#227)
* "go install" and other changes * fix "hub" path bug, add set -x * update version for the future * validate the version tag format * shellcheck * add a space
1 parent dbcee78 commit 7f3baff

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

scripts/release.sh

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
#!/bin/bash
22
set -e
3+
set -x
34

45
if [[ $# != 1 ]]; then
5-
echo "Missing parameter for version number"
6+
echo "Missing parameter for version tag (vM.m.p)"
67
exit 1
78
fi
89
VERSION="$1"
910

11+
case "$VERSION" in
12+
v*.*.*) ;;
13+
*) echo "Version parameter \"$VERSION\" is not in the expected format vM.m.p"
14+
exit 1 ;;
15+
esac
16+
1017
if [[ -z $CIRCLE_CI_TOKEN ]]; then
1118
echo "Please provide a CircleCI API token in \$CIRCLE_CI_TOKEN"
1219
exit 1
@@ -17,17 +24,23 @@ if [[ -z $GITHUB_TOKEN ]]; then
1724
exit 1
1825
fi
1926

20-
if [[ -z $GOPATH ]]; then
21-
echo "Please install Golang"
22-
exit 1
23-
fi
27+
for tool in git curl jq gzip gpg; do
28+
if ! command -v "$tool" >/dev/null; then
29+
echo "Please install the required tool '$tool'"
30+
exit 1
31+
fi
32+
done
2433

25-
if ! [[ -f "$GOPATH/bin/hub" ]]; then
34+
if ! command -v hub >/dev/null; then
2635
echo "Installing required tool Github 'hub'"
27-
go get github.com/github/hub
36+
if ! command -v go >/dev/null; then
37+
echo "Please install the Go language toolchain 'go' (needed to build 'hub')"
38+
exit 1
39+
fi
40+
go install github.com/github/hub@latest
2841
fi
2942

30-
echo "Note: Make sure that you can sign commits on this machine with your GPG key: "
43+
echo "Note: Make sure that you can sign git commits on this machine with your GPG key: "
3144
echo "https://help.github.com/articles/signing-commits/"
3245
echo ""
3346

@@ -86,7 +99,7 @@ ARTIFACT_URLS=$(curl -s "https://circleci.com/api/v1.1/project/github/DataDog/dd
8699
rm -rf .bin
87100
mkdir .bin
88101
cd .bin
89-
while read ARTIFACT_URL; do
102+
while read -r ARTIFACT_URL; do
90103
echo "Downloading artifact: ${ARTIFACT_URL}"
91104
curl -s -L -O "${ARTIFACT_URL}"
92105
done <<<"$ARTIFACT_URLS"
@@ -105,7 +118,7 @@ for f in ./*; do
105118
done
106119

107120
# Create a github release
108-
"$GOPATH/bin/hub" release create --draft \
121+
hub release create --draft \
109122
"${assets[@]}" \
110123
-m "Release $VERSION" "$VERSION"
111124
cd ..

src/version.cpp

Lines changed: 1 addition & 1 deletion
666B
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace datadog {
66
namespace version {
77

8-
const std::string tracer_version = "v1.3.2";
8+
const std::string tracer_version = "v1.3.3";
99
const std::string cpp_version = std::to_string(__cplusplus);
1010

1111
} // namespace version

0 commit comments

Comments
 (0)
0