-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmise.toml
More file actions
43 lines (36 loc) · 1.13 KB
/
mise.toml
File metadata and controls
43 lines (36 loc) · 1.13 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
# Align Go version with go.mod (same as ref-projects/cli)
[tools]
go = { version = '1.25.6' }
golangci-lint = '2.8.0'
[tasks.fmt]
description = "Run gofmt"
run = "gofmt -s -w ."
[tasks.test]
description = "Run unit tests"
run = "go test ./..."
[tasks."test:integration"]
description = "Run integration tests only"
run = "go test -tags=integration ./cmd/rekal/cli/integration_test/..."
[tasks."test:ci"]
description = "Run all tests (unit + integration) with race detection"
run = "go test -tags=integration -race ./..."
[tasks.lint]
description = "Run linters (gofmt check + golangci-lint)"
run = """
unformatted=$(gofmt -l -s .)
if [ -n "$unformatted" ]; then
echo "These files need formatting. Run: mise run fmt"
echo "$unformatted"
exit 1
fi
golangci-lint run --timeout=5m ./...
"""
[tasks.build]
description = "Build the CLI"
run = """
VERSION=$(git describe --tags --always --dirty 2>/dev/null || echo "dev")
go build -ldflags "-X github.com/rekal-dev/rekal-cli/cmd/rekal/cli.Version=${VERSION}" -o rekal ./cmd/rekal
"""
[tasks."build:all"]
description = "Build for all platforms (snapshot)"
run = "goreleaser build --snapshot --clean"