Files
home-cluster/.taskfiles/Workstation/Taskfile.yaml
T
Devin Buhl 83118cfec3 chore: improvements to e2e workflow (#1235)
* chore: improvements to e2e workflow

Signed-off-by: Devin Buhl <devin@buhl.casa>

* chore: improve taskfiles

Signed-off-by: Devin Buhl <devin@buhl.casa>

* chore: update taskfiles

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
2024-01-22 17:06:01 -05:00

51 lines
1.7 KiB
YAML

---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
vars:
ARCHFILE: "{{.ROOT_DIR}}/.taskfiles/Workstation/Archfile"
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 {{.ROOT_DIR}}/.venv"
- .venv/bin/python3 -m pip install --upgrade pip setuptools wheel
- .venv/bin/python3 -m pip install --upgrade --requirement "{{.PIP_REQUIREMENTS_FILE}}"
sources:
- "{{.PIP_REQUIREMENTS_FILE}}"
generates:
- "{{.ROOT_DIR}}/.venv/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}}" }
paru:
desc: Install workstation dependencies with Paru
cmd: paru -Syu --needed --noconfirm --noprogressbar $(cat {{.ARCHFILE}} | xargs)
preconditions:
- { msg: "Missing Paru", sh: "command -v paru" }
- { msg: "Missing Archfile", sh: "test -f {{.ARCHFILE}}" }
yay:
desc: Install workstation dependencies with Yay
cmd: yay -Syu --needed --noconfirm --noprogressbar $(cat {{.ARCHFILE}} | xargs)
preconditions:
- { msg: "Missing Yay", sh: "command -v yay" }
- { msg: "Missing Archfile", sh: "test -f {{.ARCHFILE}}" }