Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
REFACTOR: Extract compilation to its own sh script.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-smith committed Jan 24, 2017
1 parent 3a2f8ae commit d23b955
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -26,6 +26,7 @@ _testmain.go
.idea/
*.iml
.gx/
dist

# Development environment files
.ackrc
Expand Down
10 changes: 10 additions & 0 deletions build.sh
@@ -0,0 +1,10 @@
#!/bin/bash

TARGETS=${1:-windows/386,windows/amd64,darwin/amd64,linux/386,linux/amd64,linux/arm}

export CGO_ENABLED=1
docker pull karalabe/xgo-latest
go get github.com/karalabe/xgo
mkdir dist
(cd dist/ && xgo --targets=$TARGETS ../)
(chmod +x ./dist/*)
7 changes: 1 addition & 6 deletions deploy.sh
Expand Up @@ -5,12 +5,7 @@ if [ ! -z "$TRAVIS_TAG" ] &&
echo "This will deploy!"

# Cross-compile for all platforms
export CGO_ENABLED=1
docker pull karalabe/xgo-latest
go get github.com/karalabe/xgo
mkdir dist/ && cd dist/
xgo --targets=windows/386,windows/amd64,darwin/amd64,linux/386,linux/amd64,linux/arm ../
chmod +x *
./build.sh

# Copy libwinpthread-1.dll (user must rename the dll for their system to libwinpthread-1.dll)
cp ../.travis/win32/libwinpthread-1.dll dist/libwinpthread-1.win32.dll
Expand Down

0 comments on commit d23b955

Please sign in to comment.