Packaging now uses gvm

This allows the script to set the exact version of Go used to build the
program.
pull/2361/head
Philip O'Toole 2015-04-20 18:14:46 -07:00
parent 7766247552
commit 7d37a8b6b8
1 changed files with 15 additions and 0 deletions

View File

@ -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