Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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