12345678910111213141516171819202122 |
- #!/bin/sh
- cd "$(dirname "${0}")"
- say="espeak"
- umask 0022
- export VERSION="$(grep -F 'version = ' version.go | cut -d \" -f 2)"
- export GOBIN="$(go env GOPATH)/bin"
- "$(go env GOBIN)/go-bindata" -ignore=\\.DS_Store -prefix static static/... tpl/... \
- && go fmt \
- && go vet \
- && go test --short \
- && go build -ldflags "-s -w -X main.GitSHA1=$(git rev-parse --short HEAD)" -o ~/Sites/b/shaarligo.cgi \
- || { echo "Aua" 1>&2 && exit 1; }
- env GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X main.GitSHA1=$(git rev-parse --short HEAD)" -o "build/shaarligo-${VERSION}-Linux-x86_64.cgi" || { echo "Aua" 1>&2 && exit 1; }
- "${say}" "pack mas"
- ls -Al ~/Sites/b/shaarligo.cgi
- echo "http://$(hostname)/~$(whoami)/b/"
|