feat: add Makefile
This commit is contained in:
parent
f085f66d66
commit
176926f864
|
@ -1,6 +1,8 @@
|
|||
.vscode
|
||||
.woodpecker
|
||||
|
||||
build
|
||||
|
||||
configs
|
||||
|
||||
.*
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/build
|
|
@ -0,0 +1,24 @@
|
|||
BINARY_NAME=labtime
|
||||
|
||||
.PHONY: all
|
||||
all: lint test build
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
go clean -i ./...
|
||||
rm -rf build
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
@echo "Running golangci-lint"
|
||||
golangci-lint run
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
@echo "Running tests"
|
||||
go test -v ./...
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
@echo "Building binary"
|
||||
go build -o build/$(BINARY_NAME) cmd/labtime/main.go
|
Loading…
Reference in New Issue