mirror of
https://github.com/ivabus/pantry
synced 2024-09-20 00:30:48 +03:00
+pre-commit (#402)
* +pre-commit * re-run CI * re-run CI again * add test * remove git warning from test outputs * remove useless env var * re-run CI * a few cleanups
This commit is contained in:
parent
4d97cd7a5e
commit
e12e121d3b
44
projects/pre-commit.com/package.yml
Normal file
44
projects/pre-commit.com/package.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
distributable:
|
||||
url: https://github.com/pre-commit/pre-commit/archive/refs/tags/v{{ version }}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: pre-commit/pre-commit/releases/tags
|
||||
strip: /^v/
|
||||
|
||||
dependencies:
|
||||
python.org: '>=3.8'
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
pip.pypa.io: '*'
|
||||
script:
|
||||
python-venv.sh {{prefix}}/bin/pre-commit
|
||||
|
||||
provides:
|
||||
- bin/pre-commit
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
git-scm.org: '*'
|
||||
env:
|
||||
GIT_AUTHOR_NAME : "test user"
|
||||
GIT_AUTHOR_EMAIL : "test@example.com"
|
||||
GIT_COMMITTER_NAME : "test user"
|
||||
GIT_COMMITTER_EMAIL : "test@example.com"
|
||||
script: |
|
||||
test "$(pre-commit --version)" = "pre-commit {{version}}"
|
||||
git config --global init.defaultBranch main # get rid of the warning
|
||||
git init
|
||||
mv $FIXTURE .pre-commit-config.yaml
|
||||
pre-commit install
|
||||
echo 'hi\n' > f.txt
|
||||
git add f.txt
|
||||
git commit f.txt -m "test"
|
||||
fixture: |
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v0.9.1
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
|
Loading…
Reference in a new issue