Add some fixes for building in tip or with golang 1.6

This commit is contained in:
James Shubin
2016-02-22 01:30:12 -05:00
parent ed61444d82
commit f3d1369764
2 changed files with 6 additions and 2 deletions

View File

@@ -26,7 +26,11 @@ fi
# build etcd # build etcd
git clone --recursive https://github.com/coreos/etcd/ && cd etcd git clone --recursive https://github.com/coreos/etcd/ && cd etcd
git checkout v2.2.4 # TODO: update to newer versions as needed goversion=$(go version)
# if 'go version' contains string 'devel', then use git master of etcd...
if [ "${goversion#*devel}" == "$goversion" ]; then
git checkout v2.2.4 # TODO: update to newer versions as needed
fi
[ -x build ] && ./build [ -x build ] && ./build
mkdir -p ~/bin/ mkdir -p ~/bin/
cp bin/etcd ~/bin/ cp bin/etcd ~/bin/

View File

@@ -9,7 +9,7 @@ ROOT=$(dirname "${BASH_SOURCE}")/..
GO_VERSION=($(go version)) GO_VERSION=($(go version))
if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.2|go1.3|go1.4|go1.5') ]]; then if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.2|go1.3|go1.4|go1.5|go1.6') ]]; then
echo "Unknown go version '${GO_VERSION}', skipping gofmt." echo "Unknown go version '${GO_VERSION}', skipping gofmt."
exit 0 exit 0
fi fi