-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] missed the build script (#29538)
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.
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
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 |