-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
78 lines (64 loc) · 1.82 KB
/
mise.toml
File metadata and controls
78 lines (64 loc) · 1.82 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
71
72
73
74
75
76
77
78
[vars]
project = "pipeboard-cli"
version = "$(git describe --tags --always --dirty)"
[tasks.install]
depends = "build"
run = "cp build/{{vars.project}} $HOME/bin/{{vars.project}}"
[tasks.run]
description = "Run the application"
run = "go run cmd/pipeboard/*.go"
[tasks.demo]
description = "Regenerate the demo recording"
run = "cd demo && vhs demo.tape"
[tasks.clean]
description = "Clean build and test artifacts"
run = ["rm -rf build", "rm -f *.out *.html *.db", "go clean -testcache"]
[tasks.dev]
description = "Standard development workflow"
depends = ["dependencies", "format", "analysis", "test"]
alias = "d"
[tasks.dependencies]
description = "Install dependencies"
alias = "deps"
hide = true
run = ["go mod download", "go mod tidy"]
[tasks.format]
description = "Format code"
alias = "fmt"
hide = true
run = ["go fmt ./...", "prettier -lw ."]
[tasks.analysis]
description = "Run a static code analyzer"
alias = "vet"
hide = true
run = "go vet ./..."
[tasks.test]
description = "Run tests"
run = "go test -tags=coverage ./... -cover"
[tasks.build-all]
depends = ["build", "build-windows"]
description = "Build for all target platforms"
[tasks.build]
env = { CGO_ENABLED = "0", GOOS = "linux" }
run = '''
go build -a -ldflags "
-extldflags \"-static\"
-X main.version={{vars.version}}
" -o build/{{vars.project}} cmd/pipeboard/*.go
'''
[tasks.build-windows]
env = { GOARCH = "amd64", GOOS = "windows" }
run = '''
go build -ldflags "-X main.version={{vars.version}}" -o build/{{vars.project}}.exe cmd/pipeboard/*.go
'''
[tasks.coverage]
description = "Run tests with coverage report"
alias = "cov"
run = [
"go test ./... -coverprofile=coverage.out",
"go tool cover -html=coverage.out -o coverage.html",
"go tool cover -func=coverage.out",
]
[tasks.sloc]
description = "Count lines of code"
run = "tokei -C -e '*_test.go'"