doggo/Makefile

26 lines
472 B
Makefile
Raw Normal View History

BIN := ./bin/doggo
2020-12-09 18:11:09 +01:00
HASH := $(shell git rev-parse --short HEAD)
BUILD_DATE := $(shell date '+%Y-%m-%d %H:%M:%S')
2020-12-13 16:33:44 +01:00
VERSION := ${HASH}
2020-12-09 18:11:09 +01:00
.PHONY: build
build:
go build -o ${BIN} -ldflags="-X 'main.buildVersion=${VERSION}' -X 'main.buildDate=${BUILD_DATE}'" ./cmd/doggo/
2020-12-09 18:11:09 +01:00
.PHONY: run
run: build ## Build and Execute the binary after the build step
${BIN}
2020-12-09 18:11:09 +01:00
2020-12-17 12:27:44 +01:00
.PHONY: clean
2020-12-09 18:11:09 +01:00
clean:
go clean
- rm -f ${BIN}
2020-12-09 18:11:09 +01:00
2020-12-17 12:27:44 +01:00
.PHONY: lint
lint:
golangci-lint run
.PHONY: fresh
fresh: clean build