Build command for assets, use godep for tests etc

This commit is contained in:
Jakob Borg 2014-04-08 15:16:07 +02:00
parent bc5ff6e1b6
commit a203d99182

View File

@ -18,12 +18,12 @@ build() {
${godep} go build -ldflags "-w -X main.Version $version" ./cmd/stcli ${godep} go build -ldflags "-w -X main.Version $version" ./cmd/stcli
} }
prepare() { assets() {
go run cmd/assets/assets.go gui > auto/gui.files.go godep go run cmd/assets/assets.go gui > auto/gui.files.go
} }
test() { test() {
go test -cpu=1,2,4 ./... godep go test -cpu=1,2,4 ./...
} }
sign() { sign() {
@ -75,8 +75,8 @@ case "$1" in
tar) tar)
rm -f *.tar.gz *.zip rm -f *.tar.gz *.zip
prepare
test || exit 1 test || exit 1
assets
build build
eval $(go env) eval $(go env)
@ -87,8 +87,8 @@ case "$1" in
all) all)
rm -f *.tar.gz *.zip rm -f *.tar.gz *.zip
prepare
test || exit 1 test || exit 1
assets
for os in darwin-amd64 linux-386 linux-amd64 freebsd-amd64 windows-amd64 ; do for os in darwin-amd64 linux-386 linux-amd64 freebsd-amd64 windows-amd64 ; do
export GOOS=${os%-*} export GOOS=${os%-*}
@ -134,6 +134,10 @@ case "$1" in
deps deps
;; ;;
assets)
assets
;;
*) *)
echo "Unknown build parameter $1" echo "Unknown build parameter $1"
;; ;;