Skip to content

Commit

Permalink
[chore] missed the build script (#29538)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
Alex Boten authored Nov 28, 2023
1 parent c3d106f commit 4beb5c1
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions internal/buildscripts/update-dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash -x

# Updates MODULE inside go.mod if it is already present to version VERSION.

source `git rev-parse --show-toplevel`/internal/buildscripts/modules

set -e

if grep -q "$MODULE " go.mod; then
go get "$MODULE"@"$VERSION"
fi

# If MODULE is "go.opentelemetry.io/collector" need to update additional $modules as well
if [ "$MODULE" == "go.opentelemetry.io/collector" ]; then
for mod in ${beta_modules[@]}; do
if grep -q "$mod " go.mod; then
go get -d "$mod"@"$VERSION"
fi
done
for mod in ${rc_modules[@]}; do
if grep -q "$mod " go.mod; then
go get -d "$mod"@"$RC_VERSION"
fi
done
for mod in ${stable_modules[@]}; do
if grep -q "$mod " go.mod; then
go get -d "$mod"@"$STABLE_VERSION"
fi
done
fi

0 comments on commit 4beb5c1

Please sign in to comment.