Skip to content

Commit

Permalink
updates to dist.sh; bump binary version to 0.2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Oct 19, 2012
1 parent 129ad21 commit 4d1f5a6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NSQ Binaries

* 0.2.14 - 2012-10-19
* #77 ability to pause a channel (includes bugfix for message pump/diskqueue)
* #74 propagate all topic changes to lookupd
* #65 create binary releases
* 0.2.13 - 2012-10-15
* #70 deadlined nsq_to_http outbound requests
* #69/#72 improved nsq_to_file sync strategy
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PREFIX?=/usr/local
DESTDIR?=
PREFIX=/usr/local
DESTDIR=
BINDIR=${PREFIX}/bin
DATADIR=${PREFIX}/share

Expand Down
28 changes: 20 additions & 8 deletions dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,30 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd $DIR

mkdir -p dist
os=$(go env GOOS)
arch=$(go env GOARCH)
version=$(cat util/binary_version.go | tail -n1 | awk '{print $NF}' | sed 's/"//g')

TMPGOPATH=$(mktemp -d -t nsqgopath)
mkdir -p $TMPGOPATH/src
mkdir -p $TMPGOPATH/pkg/${os}_${arch}
export GOPATH="$TMPGOPATH:$GOROOT"

echo "... getting dependencies"
go get -v github.com/bitly/go-simplejson
go get -v github.com/bitly/go-notify
go get -v github.com/bmizerany/assert

version=`cat util/binary_version.go | tail -n1 | awk '{print $NF}' | sed 's/"//g'`
echo "building version $version"
echo "... running tests"
./test.sh || exit 1

mkdir -p dist
for os in linux darwin; do
echo "... building v$version for $os/$arch"
BUILD=$(mktemp -d -t nsq)
TARGET=nsq-$version.$os-$arch
mkdir -p $TARGET
export GOOS=$os GOARCH=$arch CGO_ENABLED=0
make || exit 1
DESTDIR=$BUILD/$TARGET PREFIX= make install
TARGET="nsq-$version.$os-$arch"
GOOS=$os GOARCH=$arch CGO_ENABLED=0 make || exit 1
make DESTDIR=$BUILD/$TARGET PREFIX= install
pushd $BUILD
tar czvf $TARGET.tar.gz $TARGET
mv $TARGET.tar.gz $DIR/dist
Expand Down
2 changes: 1 addition & 1 deletion util/binary_version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package util

const BINARY_VERSION = "0.2.13"
const BINARY_VERSION = "0.2.14"

0 comments on commit 4d1f5a6

Please sign in to comment.