From 7d37a8b6b8f2b6e076547da5dad444f40f45b7d9 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Mon, 20 Apr 2015 18:14:46 -0700 Subject: [PATCH] Packaging now uses gvm This allows the script to set the exact version of Go used to build the program. --- package.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package.sh b/package.sh index d9fb2d0a1e..370226801e 100755 --- a/package.sh +++ b/package.sh @@ -49,6 +49,7 @@ MAINTAINER=support@influxdb.com VENDOR=Influxdb DESCRIPTION="Distributed time-series database" +GO_VERSION="1.4.2" GOPATH_INSTALL= BINS=( influxd @@ -82,6 +83,19 @@ check_gopath() { echo "GOPATH ($GOPATH) looks sane, using $GOPATH_INSTALL for installation." } +check_gvm() { + which gvm + if [ $? -ne 0 ]; then + echo "gvm not found -- aborting." + cleanup_exit $1 + fi + gvm use $GO_VERSION + if [ $? -ne 0]; then + echo "gvm cannot find Go version $GO_VERSION -- aborting." + cleanup_exit $1 + fi +} + # check_clean_tree ensures that no source file is locally modified. check_clean_tree() { modified=$(git ls-files --modified | wc -l) @@ -207,6 +221,7 @@ fi echo -e "\nStarting package process...\n" +check_gvm check_gopath check_clean_tree update_tree