2019-01-30 20:38:03 +08:00
|
|
|
#!/bin/bash
|
|
|
|
echo "${TRAVIS_OS_NAME}"
|
|
|
|
echo "${TRAVIS_GO_VERSION}"
|
2019-07-21 22:29:59 +08:00
|
|
|
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
2019-01-30 20:38:03 +08:00
|
|
|
export GOOS=windows
|
|
|
|
export GOARCH=amd64
|
|
|
|
go build -o windows/ethr.exe -ldflags "-X main.gVersion=$TRAVIS_TAG"
|
|
|
|
export GOOS=linux
|
|
|
|
go build -o linux/ethr -ldflags "-X main.gVersion=$TRAVIS_TAG"
|
|
|
|
export GOOS=darwin
|
|
|
|
go build -o osx/ethr -ldflags "-X main.gVersion=$TRAVIS_TAG"
|
2019-01-30 20:52:03 +08:00
|
|
|
zip -j ethr_windows.zip windows/ethr.exe
|
|
|
|
zip -j ethr_linux.zip linux/ethr
|
|
|
|
zip -j ethr_osx.zip osx/ethr
|
2019-01-30 20:38:03 +08:00
|
|
|
fi
|
|
|
|
|