aboutsummaryrefslogtreecommitdiff
path: root/justfile
blob: f7ea81fe0f9adc62b61ff52292b72ede41c68a1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
TEMPDIR := `mktemp -d`
alias dr := debug-run
alias dt := debug-test

build:
    CGO=0 go build -o go-git-server cmd/main.go

run:
    go run cmd/main.go -s {{justfile_directory()}}/gitserver.yaml -r $(mktemp -d)

test:
    golangci-lint run
    go test -v -coverprofile={{ TEMPDIR }}/testcover.out ./...
    go tool cover -func={{ TEMPDIR }}/testcover.out

debug-run:
    dlv debug cmd/main.go -- -s {{justfile_directory()}}/gitserver.yaml -r $(mktemp -d) 

debug-test pkg:
    dlv test {{pkg}} -- -test.v