This commit is contained in:
deepzz0
2016-12-25 01:24:34 +08:00
parent c063061482
commit 03282123d4
3 changed files with 29 additions and 16 deletions

13
dist.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
# GOFLAGS='-ldflags="-s -w"'
version=`git describe --tags`
arch=$(go env GOARCH)
for os in linux darwin windows; do
echo "... building $version for $os/$arch"
TARGET="eiblog-$version.$os-$arch"
GOOS=$os GOARCH=$arch CGO_ENABLED=0 go build
tar czvf $TARGET.tar.gz conf static views eiblog
rm eiblog
done