mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
[FIXED] Release on linux amd64 is the only one dynamically linked
We are using the tool from https://github.com/mitchellh/gox for cross compilation. When we issue a new release, we create a tag and trigger Travis build which will then invoke the script and upload the files to GH. We were affected by https://github.com/mitchellh/gox/issues/55 Invoking the script on a Linux amd64 would produce this: file pkg/gnatsd-linux-amd64/gnatsd pkg/gnatsd-linux-amd64/gnatsd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped With the fix, you'll get this: file pkg/gnatsd-linux-amd64/gnatsd pkg/gnatsd-linux-amd64/gnatsd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped Resolves #470
This commit is contained in:
@@ -12,7 +12,7 @@ if [[ -n $1 ]]; then
|
||||
export APPNAME=$APPNAME-$1
|
||||
fi
|
||||
|
||||
gox -osarch="$OSARCH" -ldflags="-s -w" -output "$OUTDIR/$APPNAME-{{.OS}}-{{.Arch}}/gnatsd"
|
||||
env CGO_ENABLED=0 gox -osarch="$OSARCH" -ldflags="-s -w" -output "$OUTDIR/$APPNAME-{{.OS}}-{{.Arch}}/gnatsd"
|
||||
for dir in $DIRS; do \
|
||||
(cp README.md $OUTDIR/$APPNAME-$dir/README.md) ;\
|
||||
(cp LICENSE $OUTDIR/$APPNAME-$dir/LICENSE) ;\
|
||||
|
||||
Reference in New Issue
Block a user