Skip to content

Commit

Permalink
Fix darwin's zip name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Noboru Saito committed Jul 28, 2017
1 parent 343df27 commit 57fe342
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ script:
- go test $(glide novendor)
before_deploy:
- mkdir $TRAVIS_BUILD_DIR/dist
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then scripts/build.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then gox -cgo -os "darwin" -arch "386 amd64" -output "dist/{{.OS}}_{{.Arch}}/{{.Dir}}"; fi
- scripts/build.sh
- rm -f $TRAVIS_BUILD_DIR/dist/*.zip
- for i in `ls $TRAVIS_BUILD_DIR/dist/`;do zip $TRAVIS_BUILD_DIR/dist/$i.zip $TRAVIS_BUILD_DIR/dist/$i/* ;done
- cd ${TRAVIS_BUILD_DIR}/dist/ && for i in `ls .`; do cp ../README.md $i; zip $i.zip $i/* ;done
deploy:
provider: releases
api_key:
Expand Down
12 changes: 8 additions & 4 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#! /bin/sh
#! /bin/bash

TARGET="dist/trdsql_{{.OS}}_{{.Arch}}/{{.Dir}}"
gox -cgo -os "linux" -arch "386 amd64" -output ${TARGET}

CC=x86_64-w64-mingw32-gcc gox -cgo -os "windows" -arch "amd64" -output ${TARGET}
CC=i686-w64-mingw32-gcc gox -cgo -os "windows" -arch "386" -output ${TARGET}
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
gox -cgo -os "linux" -arch "386 amd64" -output ${TARGET}
CC=x86_64-w64-mingw32-gcc gox -cgo -os "windows" -arch "amd64" -output ${TARGET}
CC=i686-w64-mingw32-gcc gox -cgo -os "windows" -arch "386" -output ${TARGET}
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
gox -cgo -os "darwin" -arch "386 amd64" -output ${TARGET}
fi

0 comments on commit 57fe342

Please sign in to comment.