Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run go mod tidy before vendoring in compilecheck. #1620

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 6 additions & 7 deletions etc/compile_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@ function compile_check {
# Change the directory to the compilecheck test directory.
cd ${COMPILE_CHECK_DIR}

# If the Go version is 1.15 or greater, then run "go mod tidy".
MACHINE_VERSION=`${GC} version | { read _ _ v _; echo ${v#go}; }`
if [ $(version $MACHINE_VERSION) -ge $(version 1.15) ]; then
go mod tidy
fi

# Test vendoring
go mod vendor
${GC} build -mod=vendor

rm -rf vendor

MACHINE_VERSION=`${GC} version | { read _ _ v _; echo ${v#go}; }`

# If the version is not 1.13, then run "go mod tidy"
if [ $(version $MACHINE_VERSION) -ge $(version 1.15) ]; then
go mod tidy
fi

# Check simple build.
${GC} build ./...

Expand Down