🧑‍💻 Updated Makefile

This commit is contained in:
Maxim Lebedev 2022-03-26 00:02:05 +05:00
parent aba900e19d
commit 3093eba507
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 19 additions and 20 deletions

View File

@ -1,28 +1,27 @@
SHELL:=/bin/bash
PROJECT_NAME=indieauth
VERSION=$(shell cat VERSION)
GO_BUILD_ENV=CGO_ENABLED=0 GOOS=linux GOARCH=amd64
GO_FILES=$(shell go list ./... | grep -v /vendor/)
#!/usr/bin/make -f
SHELL = /bin/sh
build:
$(GO_BUILD_ENV) go build .
#### Start of system configuration section. ####
run:
go run .
srcdir = .
clean:
go clean
GO ?= go
GOFLAGS ?=
EXECUTABLE ?= indieauth
test:
go test -race -cover ./...
#### End of system configuration section. ####
dep:
go mod download
.PHONY: all clean check help
gen:
go generate ./...
all: main.go
$(GO) build -v $(GOFLAGS) -o $(EXECUTABLE) $<
lint:
golangci-lint run
clean: ## Delete all files in the current directory that are normally created by building the program
$(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}'