-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (24 loc) · 821 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
BUILD=CGO_ENABLED=0 go build -ldflags "-s -w"
PKG=github.com/syhpoon/xenvman/cmd
VERSION := $(shell grep const cmd/version.go | cut -f2 -d"=" | tr -d '[:space:]"')
.PHONY: fmt test vet deps build prepare default toc
build:
@$(BUILD) -o xenvman $(PKG)
toc:
@gh-md-toc README.md
fmt:
@mk/go-tool.sh "go fmt" Formatting
test:
@mk/go-tool.sh "go test -vet off -cover" Testing
cover:
@mk/cover.sh
vet:
@mk/go-tool.sh "go vet" Vetting
webapp:
@mk/build-webapp.sh
prepare: fmt test vet
release:
@env GOOS=linux GOARCH=386 $(BUILD) -o xenvman-$(VERSION)-linux-386 $(PKG)
@env GOOS=linux GOARCH=amd64 $(BUILD) -o xenvman-$(VERSION)-linux-amd64 $(PKG)
@env GOOS=darwin GOARCH=386 $(BUILD) -o xenvman-$(VERSION)-darwin-386 $(PKG)
@env GOOS=darwin GOARCH=amd64 $(BUILD) -o xenvman-$(VERSION)-darwin-amd64 $(PKG)