mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
Allow tagged release names
This commit is contained in:
@@ -22,4 +22,4 @@ script:
|
||||
- go test -v -race ./...
|
||||
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; ghr --username nats-io --token $GITHUB_TOKEN --replace $TRAVIS_TAG pkg/; 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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user