From 0abfbefa02b7e37c03e237e66ecdb8c0b9b0d188 Mon Sep 17 00:00:00 2001 From: Cosmin Cojocar Date: Fri, 27 Apr 2018 14:45:29 +0200 Subject: [PATCH] Clean up the Makefile --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e3c89bb..91e71fc 100644 --- a/Makefile +++ b/Makefile @@ -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..."