Clean up the Makefile

This commit is contained in:
Cosmin Cojocar 2018-04-27 14:45:29 +02:00
parent 639f64d421
commit 0abfbefa02

View file

@ -1,7 +1,5 @@
GIT_TAG?= $(shell git describe --always --tags)
BUILD_DATE = $(shell date +%Y-%m-%d)
BIN = gas
BUILD_CMD = go build -ldflags "-X main.Version=${VERSION} -X main.GitTag=${GIT_TAG} -X main.BuildDate=${BUILD_DATE}" -o build/$(BIN)-$(VERSION)-$${GOOS}-$${GOARCH} ./cmd/gas/ &
FMT_CMD = $(gofmt -s -l -w $(find . -type f -name '*.go' -not -path './vendor/*') | tee /dev/stderr)
IMAGE_REPO = docker.io
@ -9,21 +7,26 @@ default:
$(MAKE) bootstrap
$(MAKE) build
bootstrap:
dep ensure
test: bootstrap
test -z '$(FMT_CMD)'
go vet $(go list ./... | grep -v /vendor/)
golint -set_exit_status $(shell go list ./... | grep -v vendor)
gas ./...
ginkgo -r -v
bootstrap:
dep ensure
build:
go build -o $(BIN) ./cmd/gas/
clean:
rm -rf build vendor dist
rm -f release image bootstrap $(BIN)
release: bootstrap
goreleaser release --skip-publish
@echo "Releasing the gas binary..."
goreleaser release
image: release
@echo "Building the Docker image..."