Commit ae674a36 authored by Hyung-Kyu Hqueue Choi's avatar Hyung-Kyu Hqueue Choi Committed by Felix Lange

Makefile: clean go build cache (#17079)

parent 894022a3
...@@ -41,6 +41,7 @@ lint: ## Run linters. ...@@ -41,6 +41,7 @@ lint: ## Run linters.
build/env.sh go run build/ci.go lint build/env.sh go run build/ci.go lint
clean: clean:
./build/clean_go_build_cache.sh
rm -fr build/_workspace/pkg/ $(GOBIN)/* rm -fr build/_workspace/pkg/ $(GOBIN)/*
# The devtools target installs tools required for 'go generate'. # The devtools target installs tools required for 'go generate'.
......
#!/bin/sh
function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
golang_version=$(go version |cut -d' ' -f3 |sed 's/go//')
# Clean go build cache when go version is greater than or equal to 1.10
if !(version_gt 1.10 $golang_version); then
go clean -cache
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment