blob: 350f0bce126bf3eaa0ac5364ae1f6a695137b421 (
plain)
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
|
.DEFAULT_GOAL := build
.PHONY: build docs fmt lint cli test clean coverage sloc
VERSION := $(shell grep -o 'const Version = "[^"]*' internal/version/version.go | cut -d '"' -f 2)
build:
CGO_ENABLED="1" go build -o lib/libeduvpn_common-${VERSION}.so -buildmode=c-shared ./exports
fmt:
gofumpt -w .
lint:
golangci-lint run -E stylecheck,revive,gocritic ./...
cli:
go build ./cmd/eduvpn-cli
docs:
mkdocs build -f docs/mkdocs.yml
docs-mermaid:
find docs/md -iname "*.mmd" -exec mmdc -t neutral -b transparent -i {} -o {}.svg \;
test:
go test -tags=cgotesting -race -v ./...
clean:
rm -rf lib
go clean
coverage:
go test -tags=cgotesting -v -coverpkg=./... -coverprofile=common.cov ./...
go tool cover -func common.cov
sloc:
tokei --exclude "*_test.go" -t=Go . || cloc --include-ext=go --not-match-f='_test.go' .
|