aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-07-26 18:26:53 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-07-26 18:26:53 +0800
commitff22ec31b68c1d7aa5b3be3ad547865d70854efd (patch)
treee021e0e574caeb55a7aed4545850f715df4360e4
parenta511f6b51589f2af0a63f23a7a63238c30740ab4 (diff)
downloadgo-tangerine-ff22ec31b68c1d7aa5b3be3ad547865d70854efd.tar
go-tangerine-ff22ec31b68c1d7aa5b3be3ad547865d70854efd.tar.gz
go-tangerine-ff22ec31b68c1d7aa5b3be3ad547865d70854efd.tar.bz2
go-tangerine-ff22ec31b68c1d7aa5b3be3ad547865d70854efd.tar.lz
go-tangerine-ff22ec31b68c1d7aa5b3be3ad547865d70854efd.tar.xz
go-tangerine-ff22ec31b68c1d7aa5b3be3ad547865d70854efd.tar.zst
go-tangerine-ff22ec31b68c1d7aa5b3be3ad547865d70854efd.zip
build: noop clean during travis debsrc assembly step
-rwxr-xr-xbuild/clean_go_build_cache.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/clean_go_build_cache.sh b/build/clean_go_build_cache.sh
index a55650c8f..1666381d9 100755
--- a/build/clean_go_build_cache.sh
+++ b/build/clean_go_build_cache.sh
@@ -1,5 +1,12 @@
#!/bin/sh
+# Cleaning the Go cache only makes sense if we actually have Go installed... or
+# if Go is actually callable. This does not hold true during deb packaging, so
+# we need an explicit check to avoid build failures.
+if ! command -v go > /dev/null; then
+ exit
+fi
+
version_gt() {
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"
}