-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
96 lines (80 loc) · 1.85 KB
/
Copy pathTaskfile.yaml
File metadata and controls
96 lines (80 loc) · 1.85 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: "3"
vars:
BINARY: captain
BIN_DIR: .bin
INSTALL_DIR: /usr/local/bin
tasks:
default:
cmds:
- task --list
build:
desc: Build the captain binary
cmds:
- mkdir -p {{.BIN_DIR}}
- go build -o {{.BIN_DIR}}/{{.BINARY}} ./cmd/captain
www:build:
desc: Build the embedded Captain web UI
dir: pkg/cli/webapp
cmds:
- CI=true pnpm install --frozen-lockfile
- pnpm run build
- touch dist/.gitkeep
www:dev:
desc: Start Captain with the Vite dev proxy and open the browser
dir: pkg/cli/webapp
cmds:
- CI=true pnpm install --frozen-lockfile
- cd ../../.. && go run ./cmd/captain serve --dev --open
docs:build:
desc: Build the Captain Astro documentation site
dir: docs
cmds:
- CI=true pnpm install --frozen-lockfile
- pnpm run build
docs:dev:
desc: Start the Captain Astro documentation site
dir: docs
cmds:
- CI=true pnpm install --frozen-lockfile
- pnpm run dev
lint:
desc: Run linters
cmds:
- golangci-lint run ./...
test:
desc: Run tests
cmds:
- go test ./...
test:verbose:
desc: Run tests with verbose output
cmds:
- go test -v ./...
test:fixtures:
desc: Run gavel fixture tests
deps: [build]
cmds:
- PATH="$PWD/.bin:$PATH" gavel fixtures pkg/cli/testdata/history_test.md
install:
desc: Build and install captain to /usr/local/bin
deps: [build]
cmds:
- cp {{.BIN_DIR}}/{{.BINARY}} {{.INSTALL_DIR}}/{{.BINARY}}
fmt:
desc: Format Go code
cmds:
- gofmt -w .
tidy:
desc: Tidy go modules
cmds:
- go mod tidy
clean:
desc: Remove build artifacts
cmds:
- rm -rf {{.BIN_DIR}}
all:
desc: Run fmt, lint, test, and build
cmds:
- task: fmt
- task: lint
- task: test
- task: build