chore: add git hook installer
This commit is contained in:
parent
59c6ccbec6
commit
c10b28dbc0
10
Justfile
10
Justfile
@ -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 .
|
||||
|
||||
14
README.md
14
README.md
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user