2021-04-30 05:28:21 +03:00
|
|
|
BIN=out
|
2021-06-15 04:03:31 +03:00
|
|
|
CC=go1.17beta1
|
2021-04-30 05:28:21 +03:00
|
|
|
|
|
|
|
all: setup vendor gen build
|
|
|
|
|
|
|
|
setup:
|
2021-06-15 04:03:31 +03:00
|
|
|
@env GOOD=off go get golang.org/dl/$(CC)
|
2021-04-30 05:28:21 +03:00
|
|
|
@env GOOD=off $(CC) download
|
2021-06-15 04:03:31 +03:00
|
|
|
#@env GO111MODULE=off $(CC) get github.com/golangci/golangci-lint/cmd/golangci-lint
|
2021-04-30 05:28:21 +03:00
|
|
|
|
|
|
|
vendor: go.mod go.sum
|
|
|
|
@$(CC) mod tidy
|
|
|
|
@$(CC) mod vendor
|
|
|
|
|
|
|
|
build:
|
|
|
|
@$(CC) build -ldflags='-s -w' -o $(BIN)
|
|
|
|
|
|
|
|
gen:
|
|
|
|
@$(CC) generate ./...
|
|
|
|
|
|
|
|
test:
|
|
|
|
@env $(ENV) $(CC) test ./... -cover -count 1
|
|
|
|
|
2021-06-15 04:03:31 +03:00
|
|
|
run: lint build
|
2021-04-30 05:28:21 +03:00
|
|
|
@clear
|
2021-06-06 02:03:35 +03:00
|
|
|
@env $(ENV) ./$(BIN) -v -demo -copy "2021 i@fsh.ee" -url https://dev.fsh.ee -port 8080 -db /tmp/link_test_db_1.sql -seed secret
|
2021-04-30 05:28:21 +03:00
|
|
|
|
|
|
|
dev:
|
|
|
|
@find . -type f | grep -E '(.*)\.(go|html)' | entr -cr make run
|
2021-06-15 04:03:31 +03:00
|
|
|
|
|
|
|
lint:
|
|
|
|
@golangci-lint run ./...
|