Files
homelab/tasks/commit.yaml
2023-09-19 20:58:26 -03:00

43 lines
865 B
YAML

version: '3'
vars:
PATH_ERROR: is not installed or correctly configured in PATH.
env:
VERSION: "1.3.1"
silent: true
# Thanks https://avasdream.engineer/kubernetes-longhorn-stuck-terminating
tasks:
install:
preconditions:
- sh: "which pre-commit"
msg: "pre-commit {{.PATH_ERROR}}"
cmds:
- pre-commit install
- pre-commit install-hooks
ignore_error: true
test:
preconditions:
- sh: "which pre-commit"
msg: "pre-commit {{.PATH_ERROR}}"
cmds:
- pre-commit run --all-files
update:
preconditions:
- sh: "which pre-commit"
msg: "pre-commit {{.PATH_ERROR}}"
cmds:
- pre-commit autoupdate
default:
preconditions:
- sh: "which pre-commit"
msg: "pre-commit {{.PATH_ERROR}}"
cmds:
- task: install
- task: update
- task: test