Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
114 lines (98 loc) · 3.43 KB
/
Copy pathTaskfile.yml
File metadata and controls
114 lines (98 loc) · 3.43 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
version: '3'
# Task entry point. This file must stay at the repo root: Task only discovers
# Taskfile.* there, and --taskfile would break bare `task <name>`. Tool config
# lives in .config/ instead -- see docs/configuration.md → "Where Configuration Lives".
#
# Environment tasks (tools:*, env:*) stay here because they orchestrate the dev
# container itself. Everything else is a module under taskfiles/.
#
# The env:* tasks wrap `repo env`, whose source of truth is
# .devcontainer/env.schema.yaml -- docs/configuration.md → "Environment Variables".
#
# setup, lint and check are the verbs every Musher repository answers to
# (TASK-10).
#
# Project-specific tasks belong in a Taskfile.yml inside the consuming repo.
includes:
lint:
taskfile: taskfiles/lint.Taskfile.yml
repo:
taskfile: taskfiles/repo.Taskfile.yml
vars:
# With a product declared under [layout] in .repo/repository.toml, tasks
# reach its toolchain via `dir: '{{.PRODUCT_DIR}}'`. See docs/layout.md.
# PRODUCT_DIR: '{{.ROOT_DIR}}/<product>'
ENV_FILE: .devcontainer/.env
tasks:
setup:
desc: Install the pinned CLIs, the git hooks and .devcontainer/.env (post-create runs the same).
cmds:
- mise install --locked
- lefthook install
- repo env sync
lint:
desc: Run every lint check (markdown, yaml, actions, spelling).
cmds:
- task: lint:all
check:
desc: >-
Run every gate CI runs that can run here -- lint, the scaffold's own
policies and their tests, and engineering-conventions. CI alone also
builds the dev container and validates the compose stacks.
cmds:
- task: lint
- task: repo:check
- task: repo:test
- task: conventions
conventions:
desc: Check the repository against the pinned engineering-conventions release.
cmds:
- conventions check --fail-on warning
tools:install:
desc: Install every pinned CLI from .config/mise/config.toml (toolchain, AI CLIs, lefthook, linters).
cmds:
- mise install --locked
tools:doctor:
desc: Show mise-managed tool versions and diagnose the toolchain.
cmds:
- mise current
- mise doctor
stacks:restart:
desc: Bring the compose stacks up to match the current .env (skips stacks missing a value).
cmds:
- bash .devcontainer/scripts/startup.sh
docker:prune:
desc: Free Docker-in-Docker disk -- build cache, stopped containers, unused images. Keeps every volume.
cmds:
- docker container prune --force
- docker image prune --all --force
- docker builder prune --all --force
- docker system df
env:setup:
desc: Fill in the values the enabled stacks need, interactively.
interactive: true
cmds:
- repo env setup
env:doctor:
desc: Report what the enabled stacks still need (profile-aware). Reads .env only.
cmds:
- repo env doctor
env:sync:
desc: Write .env from the schema, or add the bindings it has gained, and mint local secrets. Never overwrites.
cmds:
- repo env sync
env:check:
desc: Alias of env:doctor, kept for muscle memory.
cmds:
- task: env:doctor
env:reset:
desc: Rewrite .env from the schema (destroys local values). Prompts first.
silent: true
cmds:
- |
read -r -p "Overwrite {{.ENV_FILE}} from the schema? [y/N] " confirm
case "${confirm}" in
y|Y|yes|YES) ;;
*) echo "Aborted."; exit 1 ;;
esac
- repo env sync --force