Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: 3.x
- run: pip install virtualenv
enable-cache: true
- run: make
- run: make push
env:
Expand Down
19 changes: 7 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
all: install-hooks build/main_bs5.css index.html hooks.html

.PHONY: install-hooks
install-hooks: venv
venv/bin/pre-commit install
install-hooks:
uv run pre-commit install

build/main_bs5.css: node_modules build scss/main_bs5.scss scss/_variables.scss
node_modules/.bin/sass --style=compressed --load-path=. scss/main_bs5.scss build/main_bs5.css

index.html hooks.html: venv base.mako index.mako hooks.mako make_templates.py template_lib.py sections/*.md
venv/bin/python make_templates.py

venv: requirements-dev.txt Makefile
rm -rf venv
virtualenv venv -ppython3
venv/bin/pip install -r requirements-dev.txt
index.html hooks.html: base.mako index.mako hooks.mako make_templates.py template_lib.py sections/*.md
uv run python make_templates.py

node_modules: package.json
( \
Expand All @@ -22,13 +17,13 @@ node_modules: package.json
touch $@ \
) || touch $@ --reference $^ --date '1 day ago'

push: venv
venv/bin/markdown-to-presentation push \
push:
uv run markdown-to-presentation push \
.nojekyll README.md CNAME \
build assets *.html *.png *.svg favicon.ico

clean:
rm -rf venv build node_modules *.html
rm -rf build node_modules *.html

build:
mkdir -p build
Expand Down
19 changes: 19 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[project]
name = "pre-commit.com"
version = "0.1.0"
description = "This powers https://pre-commit.com"
readme = "README.md"
requires-python = ">=3.7"
dependencies = []

[dependency-groups]
dev = [
"mako>=1.2.4",
"markdown-code-blocks>=3.0.0",
"markdown-to-presentation>=0.0.12",
"pre-commit>=1.21.0",
"pygments-pre-commit>=1.4.0",
]

[tool.mypy]
disallow_untyped_defs = true
5 changes: 0 additions & 5 deletions requirements-dev.txt

This file was deleted.

2 changes: 1 addition & 1 deletion sections/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Here are some sample invocations using this `.pre-commit-config.yaml`:
```yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
Expand Down
2 changes: 1 addition & 1 deletion sections/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pre-commit --version
```yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

Loading