-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
97 lines (80 loc) · 2.34 KB
/
Taskfile.yml
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
version: "3"
# .env file variables are available here, with the exception of `includes`,
# where externally defined environment variables and regular variables are available.
# It's therefore recommended to also source the .env file before running.
dotenv: [".env"]
vars:
# This environment variable must exist (i.e it's not enough that it's set in the .env file)
DEVENV: $DEVENV
env:
CSPELL_CONFIG: ./settings/cspell.yaml
includes:
aux: "{{.DEVENV}}/taskfiles/Taskfile.aux.yml"
git: "{{.DEVENV}}/taskfiles/Taskfile.git.yml"
lint: "{{.DEVENV}}/taskfiles/Taskfile.lint.yml"
format: "{{.DEVENV}}/taskfiles/Taskfile.format.yml"
go:
taskfile: "{{.DEVENV}}/taskfiles/Taskfile.go.yml"
vars:
COVERAGE: 24.0%
github: "{{.DEVENV}}/taskfiles/Taskfile.github.yml"
silent: true
output: prefixed
tasks:
docker:
desc: Run commands inside the Docker container
summary: |
This task allows you to run commands inside the Docker container.
Usage:
- `task docker` to launch the container and enter its shell
- `task docker -- task <task> -f` to run a task/command inside the container
cmds:
- docker rm -f devenv > /dev/null 2>&1 || true
- docker compose -f {{.DEVENV}}/docker-compose.yml build --build-arg CACHEBUST=$(date +%s) devenv
- docker compose -f {{.DEVENV}}/docker-compose.yml run --rm --service-ports devenv {{.CLI_ARGS}}
interactive: true
push:
desc: Push changes to the remote repository
summary: |
This task pushes changes to the remote repository.
Usage:
- `task push` for a default commit message
- `task push -- "My commit message"` for a custom commit message
cmds:
- task: git
- task: git:push
clean:
- task: aux:clean
- task: go:clean
info:
- echo "'DEVENV' read from '{{ .DEVENV }}'"
- task: git
format:
- task: format:default
- task: go:format
lint:
deps:
- lint:default
- go:lint
build:
- task: go:build
- task: go:release
test:
- task: go:quality
all:
desc: run all available tasks
cmds:
- task: clean
- task: info
- task: format
- task: lint
- task: build
- task: test
default:
desc: clean, format & lint
cmds:
- task: info
- task: format
- task: lint
update:
- task: git:update