Skip to content

Commit

Permalink
fix: add instrumentation and contrib/google.golang.org/grpc support f…
Browse files Browse the repository at this point in the history
…or v2 release script
  • Loading branch information
darccio committed Dec 19, 2024
1 parent f0a48e3 commit 975f333
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions tools/v2_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,25 @@ if [ $phase -eq 1 ]; then
fi

if [ $phase -eq 2 ]; then
# Tag all instrumentations
find ./instrumentation -type f -name go.mod | while read f; do
instrumentation=$(dirname $f)
if [ "$instrumentation" == "./instrumentation/internal/namingschematest" ]; then
continue
fi
cd $instrumentation && pwd
git tag $(echo $instrumentation | sed 's#\.\/##')/$version
git push --tags
cd -
done

echo "WARN: Please run go get in the contribs using instrumentations before running the next phase."
fi

if [ $phase -eq 3 ]; then
# Tag main contribs
cd ./contrib/net/http && pwd
git tag contrib/net/http/$version
git tag -m "contrib/net/http/$version release" contrib/net/http/$version
git push --tags
cd -

Expand All @@ -28,15 +44,15 @@ if [ $phase -eq 2 ]; then
git push --tags
cd -

cd ./instrumentation/testutils/grpc && pwd
git tag instrumentation/testutils/grpc/$version
cd ./contrib/google.golang.org/grpc && pwd
git tag contrib/google.golang.org/grpc/$version
git push --tags
cd -

echo "WARN: Please run go get in the contribs using the main contribs before running the next phase"
echo "WARN: Please run go get in the contribs using the main contribs before running the next phase."
fi

if [ $phase -eq 3 ]; then
if [ $phase -eq 4 ]; then
# Tag all contribs
find ./contrib -type f -name go.mod | while read f; do
contrib=$(dirname $f)
Expand All @@ -46,6 +62,9 @@ if [ $phase -eq 3 ]; then
if [ "$contrib" == "./contrib/database/sql" ]; then
continue
fi
if [ "$contrib" == "./contrib/google.golang.org/grpc" ]; then
continue
fi
cd $contrib && pwd
git tag $(echo $contrib | sed 's#\.\/##')/$version
git push --tags
Expand Down

0 comments on commit 975f333

Please sign in to comment.