-
Notifications
You must be signed in to change notification settings - Fork 103
/
Copy pathJustfile
48 lines (36 loc) · 1.61 KB
/
Justfile
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
set dotenv-load
default:
@just --list
pre-commit: generate tidy lint export-docs-events openapi generate-client
pc: pre-commit
lint:
@golangci-lint run --fix --build-tags it --timeout 5m
@cd {{justfile_directory()}}/tools/generator && golangci-lint run --fix --build-tags it --timeout 5m
@cd {{justfile_directory()}}/deployments/pulumi && golangci-lint run --fix --build-tags it --timeout 5m
tidy:
@go mod tidy
@cd {{justfile_directory()}}/tools/generator && go mod tidy
@cd {{justfile_directory()}}/deployments/pulumi && go mod tidy
generate:
@go generate ./...
export-docs-events:
@go run . docs events --write-dir docs/events
tests:
@go test -race -covermode=atomic \
-coverpkg=github.com/formancehq/ledger/internal/...,github.com/formancehq/ledger/pkg/events/...,github.com/formancehq/ledger/pkg/accounts/...,github.com/formancehq/ledger/pkg/assets/...,github.com/formancehq/ledger/cmd/... \
-coverprofile coverage.txt \
-tags it \
./...
@cat coverage.txt | grep -v debug.go | grep -v "/machine/" > coverage2.txt
@mv coverage2.txt coverage.txt
openapi:
@yq eval-all '. as $item ireduce ({}; . * $item)' openapi/v1.yaml openapi/v2.yaml openapi/overlay.yaml > openapi.yaml
@npx -y widdershins {{justfile_directory()}}/openapi/v2.yaml -o {{justfile_directory()}}/docs/api/README.md --search false --language_tabs 'http:HTTP' --summary --omitHeader
generate-client:
@speakeasy generate sdk -s openapi.yaml -o ./pkg/client -l go
release-local:
@goreleaser release --nightly --skip=publish --clean
release-ci:
@goreleaser release --nightly --clean
release:
@goreleaser release --clean