-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
44 lines (37 loc) · 1.08 KB
/
Taskfile.yaml
File metadata and controls
44 lines (37 loc) · 1.08 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
# https://taskfile.dev
version: "3"
tasks:
run:
desc: "启动 MiniDBA(默认读取 ./config.yaml)"
cmds:
- task golangci:fmt
- go run . -config config.yaml
build:
desc: "构建 Linux 单二进制(嵌入模板与静态资源)"
env:
CGO_ENABLED: "0"
GOOS: "linux"
GOARCH: "amd64"
cmds:
- task: golangci:fmt
- go env GOOS GOARCH CGO_ENABLED
- go build -ldflags="-s -w" -o ./release/mini-dba .
release:verify-offline:
desc: "检查 web 模板与静态资源是否引用公网字体 CDN(与 CI 门禁一致)"
cmds:
- go run ./scripts/check_offline_urls.go
release:tag:
desc: "创建并推送版本 tag(触发 GitHub Release);用法 task release:tag VERSION=v0.1.0"
requires:
vars: [VERSION]
cmds:
- git tag -a {{.VERSION}} -m "Release {{.VERSION}}"
- git push origin {{.VERSION}}
golangci:lint:
desc: "运行 golangci-lint 检查"
cmds:
- golangci-lint run
golangci:fmt:
desc: "运行 golangci-lint 格式化"
cmds:
- go fmt ./...