Skip to content

Commit

Permalink
Add helper script for binary releases
Browse files Browse the repository at this point in the history
  • Loading branch information
fiorix committed Nov 21, 2015
1 parent 90c5706 commit 18511d4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cmd/freegeoip/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

VERSION=$(go run main.go -version | cut -d\ -f2)

function pack() {
dir=freegeoip-$VERSION-$1
mkdir $dir
cp -r freegeoip public ansible-playbook $dir
tar czf ${dir}.tar.gz $dir
rm -rf $dir
}

for OS in linux darwin freebsd
do
GOOS=$OS GOARCH=amd64 go build -ldflags '-w'
pack $OS-amd64
done

0 comments on commit 18511d4

Please sign in to comment.