From ff22ec31b68c1d7aa5b3be3ad547865d70854efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 26 Jul 2018 13:26:53 +0300 Subject: [PATCH] build: noop clean during travis debsrc assembly step --- build/clean_go_build_cache.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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" }