From bf6cb864acf5fe7b840249fbd5a71a319969b6a7 Mon Sep 17 00:00:00 2001 From: Pierce Lopez Date: Thu, 1 Oct 2015 14:54:01 -0400 Subject: [PATCH 1/2] dist.sh: cleanup temp install dir --- dist.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dist.sh b/dist.sh index 07dcc5871..8b49516ac 100755 --- a/dist.sh +++ b/dist.sh @@ -50,6 +50,7 @@ for os in linux darwin; do mv $TARGET.tar.gz $DIR/dist popd make clean + rm -r $BUILD done docker build -t nsqio/nsq:v$version . From 054b22584622c172fc224d98f2c5ad12d2e8040f Mon Sep 17 00:00:00 2001 From: Pierce Lopez Date: Thu, 1 Oct 2015 14:59:18 -0400 Subject: [PATCH 2/2] dist.sh: little cleanups --- dist.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/dist.sh b/dist.sh index 8b49516ac..9b4137108 100755 --- a/dist.sh +++ b/dist.sh @@ -18,19 +18,13 @@ set -e # build binary distributions for linux/amd64 and darwin/amd64 DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -if [ -e $DIR/dist/docker ]; then - rm -rf $DIR/dist/docker -fi +rm -rf $DIR/dist/docker mkdir -p $DIR/dist/docker - -if [ -e $DIR/.godeps ]; then - rm -rf $DIR/.godeps -fi +rm -rf $DIR/.godeps mkdir -p $DIR/.godeps export GOPATH=$DIR/.godeps:$GOPATH GOPATH=$DIR/.godeps gpm install -os=$(go env GOOS) arch=$(go env GOARCH) version=$(awk '/const Binary/ {print $NF}' < $DIR/internal/version/binary.go | sed 's/"//g') goversion=$(go version | awk '{print $3}') @@ -43,9 +37,9 @@ for os in linux darwin; do BUILD=$(mktemp -d -t nsq) TARGET="nsq-$version.$os-$arch.$goversion" GOOS=$os GOARCH=$arch CGO_ENABLED=0 make - make DESTDIR=$BUILD/$TARGET PREFIX= install + make DESTDIR=$BUILD PREFIX=/$TARGET install pushd $BUILD - if [ "$os" == "linux" ]; then cp -r $BUILD/$TARGET/bin $DIR/dist/docker/; fi + if [ "$os" == "linux" ]; then cp -r $TARGET/bin $DIR/dist/docker/; fi tar czvf $TARGET.tar.gz $TARGET mv $TARGET.tar.gz $DIR/dist popd