-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
37 lines (33 loc) · 1.16 KB
/
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
---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
vars:
BREWFILE: "{{.ROOT_DIR}}/.taskfiles/Workstation/Brewfile"
tasks:
direnv:
desc: Run direnv hooks
cmd: direnv allow .
status:
- "[[ $(direnv status --json | jq '.state.foundRC.allowed') == 0 ]]"
- "[[ $(direnv status --json | jq '.state.loadedRC.allowed') == 0 ]]"
venv:
desc: Set up virtual environment
cmds:
- "{{.PYTHON_BIN}} -m venv {{.VIRTUAL_ENV}}"
- "{{.VIRTUAL_ENV}}/bin/python3 -m pip install --upgrade pip setuptools wheel"
# - '{{.VIRTUAL_ENV}}/bin/python3 -m pip install --upgrade --requirement "{{.PIP_REQUIREMENTS_FILE}}"'
# sources:
# - "{{.PIP_REQUIREMENTS_FILE}}"
generates:
- "{{.VIRTUAL_ENV}}/pyvenv.cfg"
# preconditions:
# - {
# msg: "Missing Pip requirements file",
# sh: "test -f {{.PIP_REQUIREMENTS_FILE}}",
# }
brew:
desc: Install workstation dependencies with Brew
cmd: brew bundle --file {{.BREWFILE}}
preconditions:
- { msg: "Missing Homebrew", sh: "command -v brew" }
- { msg: "Missing Brewfile", sh: "test -f {{.BREWFILE}}" }