aboutsummaryrefslogtreecommitdiff
path: root/justfile
blob: 8f30dbd4d2e5d1043ce03c421985dbb12748b5e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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