From 5ded0fbf4ec4d237cd9514187b06fb848a52aade Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Wed, 30 Aug 2017 13:36:05 +0200 Subject: [PATCH] build: fix scripts/dist.sh * get OSS version from version/version.go * fix indenting to two spaces --- scripts/dist.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/scripts/dist.sh b/scripts/dist.sh index 96238b568c..81e8ac9359 100755 --- a/scripts/dist.sh +++ b/scripts/dist.sh @@ -4,17 +4,21 @@ set -e # Get the version from the environment, or try to figure it out from the build tags. # We process the files in the same order Go does to find the last matching tag. if [ -z $VERSION ]; then + # get the OSS version from version.go + VERSION=$(awk -F\" '/Version =/ { print $2; exit }' Building version $VERSION..." @@ -35,8 +39,8 @@ fi # Do a hermetic build inside a Docker container. if [ -z $NOBUILD ]; then - docker build -t hashicorp/consul-builder scripts/consul-builder/ - docker run --rm -e "GOTAGS=$GOTAGS" -v "$(pwd)":/gopath/src/github.com/hashicorp/consul hashicorp/consul-builder ./scripts/dist_build.sh + docker build -t hashicorp/consul-builder scripts/consul-builder/ + docker run --rm -e "GOTAGS=$GOTAGS" -v "$(pwd)":/gopath/src/github.com/hashicorp/consul hashicorp/consul-builder ./scripts/dist_build.sh fi # Zip all the files.