🧑💻 Updated Makefile
This commit is contained in:
parent
aba900e19d
commit
3093eba507
39
Makefile
39
Makefile
|
@ -1,28 +1,27 @@
|
||||||
SHELL:=/bin/bash
|
#!/usr/bin/make -f
|
||||||
PROJECT_NAME=indieauth
|
SHELL = /bin/sh
|
||||||
VERSION=$(shell cat VERSION)
|
|
||||||
GO_BUILD_ENV=CGO_ENABLED=0 GOOS=linux GOARCH=amd64
|
|
||||||
GO_FILES=$(shell go list ./... | grep -v /vendor/)
|
|
||||||
|
|
||||||
build:
|
#### Start of system configuration section. ####
|
||||||
$(GO_BUILD_ENV) go build .
|
|
||||||
|
|
||||||
run:
|
srcdir = .
|
||||||
go run .
|
|
||||||
|
|
||||||
clean:
|
GO ?= go
|
||||||
go clean
|
GOFLAGS ?=
|
||||||
|
EXECUTABLE ?= indieauth
|
||||||
|
|
||||||
test:
|
#### End of system configuration section. ####
|
||||||
go test -race -cover ./...
|
|
||||||
|
|
||||||
dep:
|
.PHONY: all clean check help
|
||||||
go mod download
|
|
||||||
|
|
||||||
gen:
|
all: main.go
|
||||||
go generate ./...
|
$(GO) build -v $(GOFLAGS) -o $(EXECUTABLE) $<
|
||||||
|
|
||||||
lint:
|
clean: ## Delete all files in the current directory that are normally created by building the program
|
||||||
golangci-lint run
|
$(GO) clean
|
||||||
|
|
||||||
.PHONY: build run clean test dep gen lint
|
check: ## Perform self-tests
|
||||||
|
$(GO) test -v -cover -failfast -short -shuffle=on $(GOFLAGS) $(srcdir)/...
|
||||||
|
|
||||||
|
.PHONY: help
|
||||||
|
help: ## Display this help screen
|
||||||
|
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
Loading…
Reference in New Issue