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