blob: 90b0753c43a92dac2691f7af4273c85b2b55037f (
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
|
.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 -o eduvpn-common-cli ./cmd/cli
docs:
mkdocs build -f docs/mkdocs.yml
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' .
|