Skip to content

Commit

Permalink
Allow using go-task instead of task (#943)
Browse files Browse the repository at this point in the history
Co-authored-by: Bill Wei <bilwei@redhat.com>
  • Loading branch information
AlanCoding and bzwei authored Jun 21, 2024
1 parent 3b12a93 commit 8be667c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@
repos:
- repo: local
hooks:
# CMD logic allows using task or go-task, depending on what is installed
- id: black
name: black
language: system
types: [python]
entry: task lint:black --
entry: command -v task > /dev/null && CMD=task || CMD=go-task; ${CMD} lint:black --
- id: isort
name: isort
language: system
types: [python]
entry: task lint:isort --
entry: command -v task > /dev/null && CMD=task || CMD=go-task; ${CMD} lint:isort --
- id: ruff
name: ruff
language: system
types: [python]
entry: task lint:ruff --
entry: command -v task > /dev/null && CMD=task || CMD=go-task; ${CMD} lint:ruff --
- id: flake8
name: flake8
language: system
types: [python]
entry: task lint:flake8 --
entry: command -v task > /dev/null && CMD=task || CMD=go-task; ${CMD} lint:flake8 --
- id: migrations
name: migrations
language: system
types: [python]
pass_filenames: false
entry: task lint:migrations
entry: command -v task > /dev/null && CMD=task || CMD=go-task; ${CMD} lint:migrations
- repo: https://github.com/python-poetry/poetry
rev: '1.4.0'
hooks:
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tasks:
default:
desc: "Show this message and exit"
cmds:
- task -l
- command -v task > /dev/null && CMD=task || CMD=go-task; ${CMD} -l
silent: true

dev:init:
Expand Down

0 comments on commit 8be667c

Please sign in to comment.