forked from erigontech/diagnostics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
BINARY_NAME := diagnostics
BUILD_DIR := ./_bin
DOCKER_IMAGE_NAME := diagnostics
DOCKER_CONTAINER_NAME := diagnostics_container
all: lint build test
build:
go build -o $(BUILD_DIR)/$(BINARY_NAME) ./cmd/diagnostics
test:
go test -tags integration,endtoend ./...
run:
go run ./cmd/diagnostics
run-self-signed:
## In order to solw relod UI 404 issue first cd to folder and after run
cd ./cmd/diagnostics && go run .
clean:
rm -rf $(BUILD_DIR)
build-docker:
docker build -t $(DOCKER_IMAGE_NAME) .
run-docker:
docker run -p 8080:8080 --name $(DOCKER_CONTAINER_NAME) $(DOCKER_IMAGE_NAME)
## lint: run golangci-lint with .golangci.yml config file
lint:
@./build/bin/golangci-lint run --config ./.golangci.yml
## lintci: run golangci-lint (additionally outputs message before run)
lintci:
@echo "--> Running linter for code"
@./build/bin/golangci-lint run --config ./.golangci.yml
## lintci-deps: (re)installs golangci-lint to build/bin/golangci-lint
lintci-deps:
rm -f ./build/bin/golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.56.1
.PHONY: build test run clean