Skip to content

Commit 57fe342

Browse files
author
Noboru Saito
committed
Fix darwin's zip name.
1 parent 343df27 commit 57fe342

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ script:
1414
- go test $(glide novendor)
1515
before_deploy:
1616
- mkdir $TRAVIS_BUILD_DIR/dist
17-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then scripts/build.sh ; fi
18-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then gox -cgo -os "darwin" -arch "386 amd64" -output "dist/{{.OS}}_{{.Arch}}/{{.Dir}}"; fi
17+
- scripts/build.sh
1918
- rm -f $TRAVIS_BUILD_DIR/dist/*.zip
20-
- for i in `ls $TRAVIS_BUILD_DIR/dist/`;do zip $TRAVIS_BUILD_DIR/dist/$i.zip $TRAVIS_BUILD_DIR/dist/$i/* ;done
19+
- cd ${TRAVIS_BUILD_DIR}/dist/ && for i in `ls .`; do cp ../README.md $i; zip $i.zip $i/* ;done
2120
deploy:
2221
provider: releases
2322
api_key:

scripts/build.sh

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
#! /bin/sh
1+
#! /bin/bash
22

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

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

0 commit comments

Comments
 (0)