We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 894022a commit ae674a3Copy full SHA for ae674a3
Makefile
@@ -41,6 +41,7 @@ lint: ## Run linters.
41
build/env.sh go run build/ci.go lint
42
43
clean:
44
+ ./build/clean_go_build_cache.sh
45
rm -fr build/_workspace/pkg/ $(GOBIN)/*
46
47
# The devtools target installs tools required for 'go generate'.
build/clean_go_build_cache.sh
@@ -0,0 +1,10 @@
1
+#!/bin/sh
2
+
3
+function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
4
5
+golang_version=$(go version |cut -d' ' -f3 |sed 's/go//')
6
7
+# Clean go build cache when go version is greater than or equal to 1.10
8
+if !(version_gt 1.10 $golang_version); then
9
+ go clean -cache
10
+fi
0 commit comments