mirror of
https://github.com/InstanceBrick/nightcap.git
synced 2026-10-17 12:00:49 +02:00
Add a pre-commit check for added changelog lines over 110 characters. Roblox has no Nintendo glyph set, so the roadmap item cannot be met.
29 lines
988 B
YAML
29 lines
988 B
YAML
# Local git hooks. Install once with: lefthook install
|
|
# Mirrors the "Repository contracts" job in .github/workflows/ci.yml.
|
|
|
|
pre-commit:
|
|
parallel: true
|
|
commands:
|
|
shell-syntax:
|
|
glob: "{scripts,tests,packaging}/**/*.sh"
|
|
run: for f in {staged_files}; do bash -n "$f" || exit 1; done
|
|
json:
|
|
glob: "{config,packaging}/**/*.json"
|
|
run: for f in {staged_files}; do jq empty "$f" || exit 1; done
|
|
desktop-entry:
|
|
glob: "*.desktop"
|
|
run: desktop-file-validate {staged_files}
|
|
changelog-width:
|
|
glob: "CHANGELOG.md"
|
|
run: >-
|
|
git diff --cached -U0 -- CHANGELOG.md |
|
|
awk '/^\+[^+]/ && length($0) > 111 { print "CHANGELOG.md: added line over 110 characters: " substr($0, 2); bad = 1 } END { exit bad }'
|
|
|
|
pre-push:
|
|
commands:
|
|
packaging-contracts:
|
|
run: >-
|
|
bash tests/managed_payload_build_contract_test.sh . &&
|
|
bash tests/flatpak_packaging_test.sh . &&
|
|
bash tests/native_packaging_test.sh .
|