-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yaml
60 lines (50 loc) · 1016 Bytes
/
Taskfile.yaml
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
# https://taskfile.dev
version: "3"
tasks:
deps-ui:
dir: ./ui
cmds:
- yarn
deps:
cmds:
- go mod download
- task: deps-ui
test:
cmds:
- go test ./...
build-ui:
dir: ./ui
cmds:
- task: deps-ui
- yarn build
build:
cmds:
- task: build-ui
- go build -o out/tvhgo -tags prod main.go
docker:
vars:
IMAGE: ghcr.io/davidborzek/tvhgo
GIT_COMMIT:
sh: git rev-parse --short HEAD
cmds:
- cmd: docker rmi {{.IMAGE}}
ignore_error: true
- cmd: docker rmi {{.IMAGE}}:{{.GIT_COMMIT}}
ignore_error: true
- cmd: >
docker build --rm
--build-arg GIT_COMMIT={{.GIT_COMMIT}}
-t {{.IMAGE}} .
- cmd: >
docker tag {{.IMAGE}} {{.IMAGE}}:{{.GIT_COMMIT}}
swagger:
cmds:
- swag fmt
- swag init -o docs/api
cli_docs:
cmds:
- go run docs/cli/docs.go
docs:
cmds:
- task: swagger
- task: cli_docs