chore: add git hook installer

This commit is contained in:
Guillaume ARM 2026-05-31 02:48:19 +02:00
parent 59c6ccbec6
commit c10b28dbc0
2 changed files with 24 additions and 0 deletions

View File

@ -5,6 +5,16 @@
default:
@just --list
# Install local development tooling.
install: install-git-hooks
# Install Git hooks for this repository.
install-git-hooks:
@mkdir -p .git/hooks
@printf '%s\n' '#!/bin/sh' '' 'just check' > .git/hooks/pre-push
@chmod +x .git/hooks/pre-push
@printf '%s\n' 'Installed .git/hooks/pre-push'
# Lint all Lua source with luacheck.
check:
luacheck .

View File

@ -1,5 +1,19 @@
# Trap's ComputerCraft APIs
## Development
Requirements:
- `just`
- `luacheck`
After cloning the repository, run:
```
just install
```
This installs the local Git hooks, including a pre-push hook that runs `just check`.
## Installation
```
wget run https://raw.githubusercontent.com/guillaumearm/cc-libs/master/install.lua