forked from ayoisaiah/focus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
58 lines (41 loc) · 1.29 KB
/
justfile
File metadata and controls
58 lines (41 loc) · 1.29 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
APP := "focus"
toolprefix := "go tool -modfile=tools.mod"
# Run all tests
test:
@go test ./... -coverprofile=coverage.out -coverpkg=. -json -race | {{toolprefix}} gotestfmt -hide 'empty-packages'
[no-cd]
test-pkg filter='.*':
@go test ./... -json -coverprofile=coverage.out -coverpkg=. -run={{filter}} | {{toolprefix}} gotestfmt -hide 'empty-packages'
[no-cd]
update-golden filter='.*':
@go test ./... -update -json -run={{filter}} | {{toolprefix}} gotestfmt
install:
@go mod download
@go mod download -modfile=tools.mod
add pkg:
@go get -u {{pkg}}
add-tool tool:
@go get -modfile=tools.mod -tool {{tool}}
show-updates:
@go list -u -f '{{"{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}"}}' -m all
@go list -modfile=tools.mod -u -f '{{"{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}"}}' -m all
update-deps:
@go get -u ./...
update-tools:
@go get -modfile=tools.mod -u ./...
update: && update-deps update-tools
tools:
@go tool -modfile=tools.mod
build:
@go build -o bin/{{APP}} ./cmd...
build-win:
@go build -o bin/{{APP}}.exe ./cmd...
lint:
@{{toolprefix}} golangci-lint run ./...
pre-commit:
@pre-commit run
clean:
@rm -r bin
@go clean
sloc:
@{{toolprefix}} scc