-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (30 loc) · 864 Bytes
/
Makefile
File metadata and controls
44 lines (30 loc) · 864 Bytes
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
44
default: certgraph
RELEASE_DEPS = fmt lint
include release.mk
BUILD_FLAGS := -trimpath -ldflags "-w -s -X main.version=${VERSION}"
SOURCES := $(shell find . -maxdepth 1 -type f -name "*.go")
ALL_SOURCES = $(shell find . -type f -name '*.go') go.mod docs/*
.PHONY: release fmt clean serv docker lint deps update-deps
certgraph: $(SOURCES) $(ALL_SOURCES)
go build $(BUILD_FLAGS) -o $@ .
docker: Dockerfile $(ALL_SOURCES)
docker build --build-arg VERSION=${VERSION} -t lanrat/certgraph .
deps: go.mod
GOPROXY=direct go mod download
GOPROXY=direct go get -u all
update-deps:
go get -u
go mod tidy
fmt:
go fmt ./...
clean:
rm -rf certgraph dist/
lint:
golangci-lint run
serv: certgraph
./certgraph --serve 127.0.0.1:8080
test:
go test -v ./... | grep -v "\[no test files\]"
.PHONY: goreleaser
goreleaser:
goreleaser release --snapshot --clean