2019-08-14 01:10:28 +01:00
|
|
|
NAME := pominal
|
|
|
|
BIN_DIR := ./bin
|
|
|
|
BIN_FILE := $(BIN_DIR)/$(NAME)
|
2019-06-29 22:11:25 +01:00
|
|
|
|
2019-08-14 01:10:28 +01:00
|
|
|
.PHONY: all test_unit build clean
|
2019-06-29 22:11:25 +01:00
|
|
|
|
2019-08-14 01:10:28 +01:00
|
|
|
all: test_unit build
|
|
|
|
|
|
|
|
test_unit:
|
2020-01-18 01:48:27 +00:00
|
|
|
@go test -v -coverprofile=cover.out .
|
2020-01-18 01:04:51 +00:00
|
|
|
|
|
|
|
test_cover_report: test_unit
|
|
|
|
@go tool cover -html=cover.out -o code-coverage.html
|
2019-06-29 22:11:25 +01:00
|
|
|
|
2020-01-24 09:51:21 +00:00
|
|
|
test_lint:
|
|
|
|
@golangci-lint run --color always
|
|
|
|
|
2019-06-29 22:11:25 +01:00
|
|
|
build:
|
2019-09-18 09:08:12 +01:00
|
|
|
@go build -a -v -o $(BIN_FILE)
|
2020-02-12 15:05:19 +00:00
|
|
|
@cp -a assets bin/assets
|
2019-06-29 22:11:25 +01:00
|
|
|
|
|
|
|
clean:
|
2019-09-18 09:08:12 +01:00
|
|
|
@go clean
|
2020-02-12 15:05:19 +00:00
|
|
|
@rm -rf $(BIN_FILE) $(BIN_DIR)/assets
|