Merge pull request #248 from nats-io/release_process

Release process
This commit is contained in:
Derek Collison
2016-04-18 20:25:26 -07:00
3 changed files with 25 additions and 9 deletions

View File

@@ -1,6 +1,15 @@
language: go
go:
- 1.5
- 1.6
env:
global:
- BUILD_GOARCH=amd64
- GO15VENDOREXPERIMENT=1
matrix:
- BUILD_GOOS=linux
- BUILD_GOOS=darwin
- BUILD_GOOS=windows
install:
- go get github.com/nats-io/nats
- go get github.com/mattn/goveralls
@@ -11,4 +20,6 @@ script:
- go vet ./...
- go test -i -race ./...
- go test -v -race ./...
- ./scripts/cov.sh TRAVIS
after_script:
- if [ "$TRAVIS_GO_VERSION" = "1.6" ] && [ "$BUILD_GOOS" = "linux" ]; then ./scripts/cov.sh TRAVIS; fi
- if [ "$TRAVIS_GO_VERSION" = "1.6" ] && [ "$BUILD_GOOS" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then ./scripts/cross_compile.sh $TRAVIS_TAG; ghr --username nats-io --token $GITHUB_TOKEN --replace $TRAVIS_TAG pkg/; fi

View File

@@ -3,14 +3,19 @@ go get github.com/mitchellh/gox
go get github.com/tcnksm/ghr
export APPNAME="gnatsd"
export OSARCH="linux/386 linux/amd64 linux/arm darwin/amd64 solaris/amd64 windows/386 windows/amd64"
export DIRS="linux_386 linux_amd64 linux_arm darwin_amd64 solaris_amd64 windows_386 windows_amd64"
export OSARCH="linux/386 linux/amd64 linux/arm darwin/amd64 windows/386 windows/amd64"
export DIRS="linux-386 linux-amd64 linux-arm darwin-amd64 windows-386 windows-amd64"
export OUTDIR="pkg"
gox -osarch="$OSARCH" -output "$OUTDIR/$APPNAME-{{.OS}}_{{.Arch}}/$APPNAME"
# If we have an arg, assume its a version tag and rename as appropriate.
if [[ -n $1 ]]; then
export APPNAME=$APPNAME-$1
fi
gox -osarch="$OSARCH" -ldflags="-s -w" -output "$OUTDIR/$APPNAME-{{.OS}}-{{.Arch}}/$APPNAME"
for dir in $DIRS; do \
(cp README.md $OUTDIR/$APPNAME-$dir/README.md) ;\
(cp LICENSE $OUTDIR/$APPNAME-$dir/LICENSE) ;\
(cd $OUTDIR && zip -q $APPNAME-$dir.zip -r $APPNAME-$dir) ;\
echo "make $OUTDIR/$APPNAME-$dir.zip" ;\
(cp README.md $OUTDIR/$APPNAME-$dir/README.md) ;\
(cp LICENSE $OUTDIR/$APPNAME-$dir/LICENSE) ;\
(cd $OUTDIR && zip -q $APPNAME-$dir.zip -r $APPNAME-$dir) ;\
echo "make $OUTDIR/$APPNAME-$dir.zip" ;\
done

View File

@@ -45,7 +45,7 @@ func TestPSEmulation(t *testing.T) {
if delta < 0 {
delta = -delta
}
if delta > 200*1024 { // 200k
if delta > 512*1024 { // 512k
t.Fatalf("RSSs did not match close enough: %d vs %d", rss, psRss)
}
}