mirror of
https://github.com/cbednarski/hostess
synced 2024-11-11 19:10:37 +00:00
Added release target to Makefile
This commit is contained in:
parent
aeb56f8a79
commit
ddad9598d6
46
Makefile
46
Makefile
@ -1,29 +1,29 @@
|
||||
all: build test
|
||||
all: test install
|
||||
|
||||
deps:
|
||||
go get golang.org/x/lint/golint
|
||||
go get golang.org/x/tools/cmd/cover
|
||||
go get
|
||||
|
||||
build: deps
|
||||
go build cmd/hostess/hostess.go
|
||||
|
||||
test:
|
||||
go test -coverprofile=coverage.out; go tool cover -html=coverage.out -o coverage.html
|
||||
go vet $(PACKAGES)
|
||||
golint $(PACKAGES)
|
||||
|
||||
build-all: test
|
||||
|
||||
echo FIXME
|
||||
exit 1
|
||||
# Note: this command will be slightly messy UNLESS we are on a tag, which is
|
||||
# what we want.
|
||||
RELEASE_VERSION=$(shell git describe --tags)
|
||||
|
||||
install:
|
||||
go install .
|
||||
|
||||
clean:
|
||||
rm -f ./hostess
|
||||
rm -f ./hostess_*
|
||||
rm -f ./coverage.*
|
||||
deps:
|
||||
go install golang.org/x/lint/golint
|
||||
go install golang.org/x/tools/cmd/cover
|
||||
|
||||
.PHONY: all deps build test gox build-all install clean
|
||||
test: deps
|
||||
go test -coverprofile=coverage.out; go tool cover -html=coverage.out -o coverage.html
|
||||
go vet $(PACKAGES)
|
||||
golint $(PACKAGES)
|
||||
|
||||
release: test
|
||||
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.Version=${RELEASE_VERSION}" -o bin/hostess_windows_amd64.exe .
|
||||
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.Version=${RELEASE_VERSION}" -o bin/hostess_macos_amd64 .
|
||||
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.Version=${RELEASE_VERSION}" -o bin/hostess_linux_amd64 .
|
||||
GOOS=linux GOARCH=arm go build -ldflags "-X main.Version=${RELEASE_VERSION}" -o bin/hostess_linux_arm .
|
||||
|
||||
clean:
|
||||
rm -f ./coverage.*
|
||||
rm -rf ./bin/
|
||||
|
||||
.PHONY: all install deps test release clean
|
||||
|
Loading…
Reference in New Issue
Block a user