github.com/Benchkram/bob@v0.0.0-20220321080157-7c8f3876e225/Makefile (about) 1 VERSION := "v0.0.0" 2 SHELL := /usr/bin/env bash 3 4 .PHONY: help 5 help: 6 @egrep -h '\s#\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?# "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' 7 8 .PHONY: build 9 build: # build the tool 10 @go build -tags dev -ldflags="-X 'main.Version=${VERSION}'" -o ./run 11 12 .PHONY: install 13 install: # install the tool 14 @go install -tags dev -ldflags="-X 'main.Version=${VERSION}'" 15 16 .PHONY: install 17 install-prod: # install the tool 18 @go install -ldflags="-X 'main.Version=${VERSION}'" 19 20 .PHONY: test 21 test: # run tests 22 @go test -v ./... 23 24 .PHONY: lint 25 lint: # lint code 26 @CGO_ENABLED=0 golangci-lint run --timeout=10m0s