Update makefile to for easier builds
This commit is contained in:
parent
64cad5c35d
commit
e83495a09e
32
Makefile
32
Makefile
|
@ -1,28 +1,10 @@
|
||||||
BINARY = "build/wings"
|
build:
|
||||||
OSARCHLIST = "darwin/386 darwin/amd64 linux/386 linux/amd64 linux/arm linux/arm64 windows/386 windows/amd64"
|
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -gcflags "all=-trimpath=/Users/dane/Sites/development/code" -o build/wings_linux_amd64 -v wings.go
|
||||||
|
|
||||||
all: $(BINARY)
|
compress:
|
||||||
|
upx --brute build/wings_*
|
||||||
|
|
||||||
$(BINARY):
|
cross-build: clean build compress
|
||||||
go build -o $(BINARY)
|
|
||||||
|
|
||||||
cross-build:
|
clean:
|
||||||
gox -osarch $(OSARCHLIST) -output "build/{{.Dir}}_{{.OS}}_{{.Arch}}"
|
rm -rf build/wings_*
|
||||||
|
|
||||||
.PHONY: install
|
|
||||||
install:
|
|
||||||
go install
|
|
||||||
|
|
||||||
test:
|
|
||||||
go test `go list ./... | grep -v "/vendor/"`
|
|
||||||
|
|
||||||
coverage:
|
|
||||||
goverage -coverprofile=coverage.out ./...
|
|
||||||
go tool cover -html=coverage.out
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
glide install
|
|
||||||
|
|
||||||
install-tools:
|
|
||||||
go get -u github.com/mitchellh/gox
|
|
||||||
go get -u github.com/haya14busa/goverage
|
|
Loading…
Reference in New Issue
Block a user