Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
162 lines (132 loc) · 4.32 KB
/
Copy pathTaskfile.yml
File metadata and controls
162 lines (132 loc) · 4.32 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
tasks:
default:
- task: lint
- task: vet
build:
desc: Build the outtake binary
cmds:
- go build -o ./bin/outtake .
test:
desc: Run tests under the race detector and gate the hand-written code's coverage
cmds:
- go test -race -count=1 -covermode=atomic -coverprofile=coverage.out ./...
- build/ci/coverage-gate.sh coverage.out
test-e2e:
desc: Run e2e tests (requires FFmpeg and Plex credentials)
cmds:
- go test -v -count=1 -tags e2e ./testing/e2e/...
test-e2e-parallel:
desc: Run e2e tests in parallel (requires FFmpeg and Plex credentials)
cmds:
- go test -v -count=1 -p 4 -parallel 8 -tags e2e ./testing/e2e/...
mock:
desc: Generate test mocks using mockery, with imports grouped like the rest of the code
cmds:
- go tool mockery --config=build/mockery/mockery.yaml
- find internal -type d -name mocks -exec go tool goimports -local github.com/PapagoLabs/outtake -w {} +
lint:
desc: Run golangci-lint
cmds:
- golangci-lint run --fix --config build/golangci-lint/golangci-lint.yaml ./...
lint-ci:
desc: Run golangci-lint in CI mode (no fix)
cmds:
- golangci-lint run --config build/golangci-lint/golangci-lint.yaml ./...
vet:
desc: Run go vet, including the e2e suite
cmds:
- go vet ./...
- go vet -tags e2e ./testing/e2e/...
fmt:
desc: Format code
cmds:
- golangci-lint fmt --config build/golangci-lint/golangci-lint.yaml ./...
run:
desc: Run outtake
cmds:
- go run . server start
compose-dev:
desc: Run outtake via docker compose
cmds:
- docker compose up --build
goreleaser:
desc: Validate and snapshot-build with GoReleaser
deps: [templ]
cmds:
- goreleaser build --config build/goreleaser/stable.yaml --snapshot --clean
goreleaser:check:
desc: Validate the GoReleaser configuration
cmds:
- goreleaser check --config build/goreleaser/stable.yaml
- goreleaser check --config build/goreleaser/nightly.yaml
goreleaser:release:
desc: Create a stable release with GoReleaser, with git-cliff's section for the tag as its notes
deps: [templ]
cmds:
- |
notes="$(mktemp)"
trap 'rm -f "$notes"' EXIT
git-cliff --config cliff.toml --latest --strip all --output "$notes"
goreleaser release --config build/goreleaser/stable.yaml --release-notes "$notes"
goreleaser:nightly:
desc: Snapshot a nightly image build with GoReleaser
deps: [templ]
cmds:
- goreleaser release --config build/goreleaser/nightly.yaml --snapshot --clean --skip=validate,archive
install:
desc: Install outtake
cmds:
- go install .
mod-tidy:
desc: Tidy Go modules
cmds:
- go mod tidy
mod-download:
desc: Download Go modules
cmds:
- go mod download
mod-verify:
desc: Verify Go modules
cmds:
- go mod verify
clean:
desc: Clean build artifacts
cmds:
- rm -rf bin/ docs/public docs/resources/_gen
docs:
desc: Regenerate the CLI reference under docs/content/cli-reference
cmds:
- rm -rf docs/content/cli-reference
- go run ./tools/docgen -out ./docs/content/cli-reference
docs:build:
desc: Build the documentation site into docs/public
cmds:
- hugo --source docs --gc --minify
docs:serve:
desc: Preview the documentation site with live reload
cmds:
- hugo server --source docs
templ:
desc: Run templ
cmds:
- go tool templ generate
- go tool goimports -local github.com/PapagoLabs/outtake -w ./internal/web
templ-watch:
desc: Run templ with integrated server and hot reload
cmds:
- go tool templ generate --watch --proxy="http://localhost:8080" --cmd="go run . server start" --open-browser=false
theme-css:
desc: Generate palette CSS from the theme catalog
cmds:
- go run ./internal/web/theme/gen.go
tailwind:
desc: Watch Tailwind CSS changes
deps: [theme-css]
cmds:
- "tailwindcss -i ./internal/web/assets/css/input.css -o ./internal/web/assets/css/output.css"
tailwind-watch:
desc: Watch Tailwind CSS changes
cmds:
- "tailwindcss -i ./internal/web/assets/css/input.css -o ./internal/web/assets/css/output.css --watch"