Skip to content

Commit

Permalink
Add build script
Browse files Browse the repository at this point in the history
  • Loading branch information
knicklabs committed Jul 19, 2019
1 parent 89aa83c commit 18f5501
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Output of build script
builds

# Dependency directories
vendor/

Expand Down
18 changes: 18 additions & 0 deletions scripts/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e

release_path="builds"
targets=${@-"darwin/amd64 darwin/386 linux/amd64 linux/386 windows/amd64 windows/386"}
mkdir -p $release_path

for target in $targets; do
os="$(echo $target | cut -d '/' -f1)"
arch="$(echo $target | cut -d '/' -f2)"
output="${release_path}/sup_${os}_${arch}"
GOOS=$os GOARCH=$arch CGO_ENABLED=0 go build -o $output
zip -j $output.zip $output > /dev/null
done

cd $release_path
ls -al

0 comments on commit 18f5501

Please sign in to comment.