add release script

This commit is contained in:
Victor Vrantchan
2016-05-18 00:28:27 -04:00
parent 7ce47606a2
commit 0de875ed56
2 changed files with 18 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
vendor/
.docker/data/root/
micromdm
build/
.k8/
*.crt
*.key

17
release.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
VERSION="0.1.0"
NAME=micromdm
echo "Building $NAME version $VERSION"
mkdir -p build
build() {
echo -n "=> $1-$2: "
GOOS=$1 GOARCH=$2 go build -o build/$NAME-$1-$2 -ldflags "-X main.Version=$VERSION -X main.gitHash=`git rev-parse HEAD`" ./main.go
du -h build/$NAME-$1-$2
}
build "darwin" "amd64"
build "linux" "amd64"