Permalink
Browse files

Add helper script for binary releases

  • Loading branch information...
1 parent 90c5706 commit 18511d4f436548a08960fdf7b4d7d7d3deda7b95 @fiorix committed Nov 21, 2015
Showing with 17 additions and 0 deletions.
  1. +17 −0 cmd/freegeoip/release.sh
@@ -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.