-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.mise.toml
More file actions
70 lines (53 loc) · 2.93 KB
/
Copy path.mise.toml
File metadata and controls
70 lines (53 loc) · 2.93 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
59
60
61
62
63
64
65
66
67
68
69
70
[tools]
go = "1.26"
[tasks.fmt]
description = "Format Go files"
run = "gofmt -w ."
[tasks.fmt-check]
description = "Check Go formatting"
run = "test -z \"$(gofmt -l .)\""
[tasks.vet]
description = "Run go vet"
run = "go vet ./..."
[tasks.test]
description = "Run unit tests"
run = "go test ./..."
[tasks.coverage]
description = "Run tests with coverage summary"
run = "go test ./... -coverprofile=coverage.out -covermode=atomic && go tool cover -func=coverage.out"
[tasks.coverage-html]
description = "Generate HTML coverage report"
run = "go test ./... -coverprofile=coverage.out -covermode=atomic && go tool cover -html=coverage.out -o coverage.html"
[tasks.build]
description = "Build project"
run = "mkdir -p build && VERSION=$(git describe --tags --always --abbrev=0 2>/dev/null | sed 's/^v//' || echo 'dev') && go build -ldflags \"-X 'systemd-hwdb-gui/internal/guiapp.AppVersion=${VERSION}'\" -o build/systemd-hwdb-gui ./cmd/systemd-hwdb-gui"
[tasks.build-386]
description = "Build Linux 32-bit (386) binary"
run = "mkdir -p build && VERSION=$(git describe --tags --always --abbrev=0 2>/dev/null | sed 's/^v//' || echo 'dev') && GOOS=linux GOARCH=386 CGO_ENABLED=1 CC='gcc -m32' CXX='g++ -m32' PKG_CONFIG_LIBDIR='/usr/lib/i386-linux-gnu/pkgconfig:/usr/share/pkgconfig' go build -ldflags \"-X 'systemd-hwdb-gui/internal/guiapp.AppVersion=${VERSION}'\" -o build/systemd-hwdb-gui-linux-386 ./cmd/systemd-hwdb-gui"
[tasks.build-all]
description = "Build default and 32-bit binaries"
depends = ["build", "build-386"]
[tasks.dev]
description = "Run the app"
run = "VERSION=$(git describe --tags --always --abbrev=0 2>/dev/null | sed 's/^v//' || echo 'dev') && go run -ldflags \"-X 'systemd-hwdb-gui/internal/guiapp.AppVersion=${VERSION}'\" ./cmd/systemd-hwdb-gui"
[tasks.env-check]
description = "Check that Go is available in PATH"
run = "command -v go && go version"
[tasks.env-fix]
description = "Create stable ~/.local/bin/go symlink from mise toolchain"
run = "mkdir -p ~/.local/bin && ln -sf \"$(mise which go)\" ~/.local/bin/go && ls -l ~/.local/bin/go && ~/.local/bin/go version"
[tasks.ide-open]
description = "Open VS Code/Codium from mise environment"
run = "if command -v codium >/dev/null 2>&1; then codium --new-window .; elif command -v code >/dev/null 2>&1; then code --new-window .; else echo 'Install VS Code or VSCodium to use this task' && exit 1; fi"
[tasks.check]
description = "Run formatting check, vet, and tests"
depends = ["fmt-check", "vet", "test"]
[tasks.integration-dry-run]
description = "Run integration-style dry-run hwdb test"
run = "go test ./internal/guiapp -run TestIntegrationDryRunSampleHWDB -count=1"
[tasks.workflow-check]
description = "Check workflow regression guards locally"
run = "go test ./cmd/systemd-hwdb-gui -run 'Test(ReleaseWorkflowRegressionGuards|CIWorkflowActionMajors)' -count=1"
[tasks.hooks-install]
description = "Install git hooks from .githooks"
run = "git config core.hooksPath .githooks && chmod +x .githooks/pre-commit"