Skip to content

Commit

Permalink
merging latest tag v2.0.1 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins BDS R&D committed Jan 26, 2018
2 parents ec98045 + f077c72 commit 7fd5bf7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ vet:
fi

tools:
go get -u -v $(GOTOOLS)
@./build/tools.sh $(GOTOOLS)

savedeps: checks
@godep save -v ./...
Expand Down
36 changes: 36 additions & 0 deletions build/tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
#set -x
scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

error_exit () {
>&2 echo "${1}"
if [[ $# -gt 1 ]]
then
exit ${2}
else
exit 1
fi
}

copy_tools () {
if [[ -z "$GOPATH" ]]; then
error_exit "GOPATH env var should be set..."
fi
for tool in $@; do
tool="${tool%%/...*}"
if [[ ! -x $GOPATH/bin/${tool##*/} ]]; then
echo "$GOPATH/bin/${tool##*/} doesn't exist. We copy it from build tools folder to $GOPATH/bin"
arch=$(uname -m)
if [[ ! -d ${scriptDir}/tools/${arch} ]]; then
error_exit "No binaries found for arch:${arch}"
fi
cp ${scriptDir}/tools/${arch}/${tool##*/} $GOPATH/bin
fi
done
}

go get -u -v $@
if [[ $? -ne 0 ]]; then
echo "go get command failed for tools building : we'll use saved binaries instead."
copy_tools $@
fi
2 changes: 1 addition & 1 deletion versions.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
janus_version: 2.0.0
janus_version: 2.0.1
consul_version: 1.0.1
terraform_version: 0.9.11
ansible_version: 2.4.1.0
Expand Down

0 comments on commit 7fd5bf7

Please sign in to comment.