From 85fdb67dc3eaeed20a57f11e23a8c7367d747793 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Fri, 2 Jan 2026 16:12:20 -0600 Subject: [PATCH] Updating datafile limit to 250K; adding .wiki-repo touchfile to bypass compile and package checks --- Hooks/pre-commit | 8 +++++++- Hooks/scripts.d/find-data-files | 2 +- README.md | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Hooks/pre-commit b/Hooks/pre-commit index ffff33f..16d5338 100755 --- a/Hooks/pre-commit +++ b/Hooks/pre-commit @@ -8,7 +8,13 @@ # To enable this hook, rename this file to "pre-commit". # Run all our checking scripts. -for script in $(find `dirname "$0"`/scripts.d -type f); do +# +scriptlist="$(find `dirname "$0"`/scripts.d -type f)" +if [ -f .wiki-repo ]; then + scriptlist="$(echo "$scriptlist" | grep -vE 'Makefile|PKGBUILD|pytest')" +fi + +for script in $scriptlist; do echo "Running ${script}" "$script" if [ $? -ne 0 ]; then diff --git a/Hooks/scripts.d/find-data-files b/Hooks/scripts.d/find-data-files index 4d7d0dc..8708709 100755 --- a/Hooks/scripts.d/find-data-files +++ b/Hooks/scripts.d/find-data-files @@ -19,7 +19,7 @@ for file in `git ls-files | xargs -d '\n' -n 1 file | grep -Ev 'ASCII text|JSON| continue fi - if [ "$(du -k "${filename}" | awk '{ print $1; }')" -gt 10 ]; then + if [ "$(du -k "${filename}" | awk '{ print $1; }')" -gt 250 ]; then echo "$file" result=1 fi diff --git a/README.md b/README.md index 66a5df8..e219e09 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,10 @@ Notably, each repo that subscribes to this enforcement can also commit their own When used with `uniglot-clone`, there are several directories at which AniNIX/Uniglot's hooks will look. -* the `rss/` directory will be used by `Hooks/scripts.d/generate-rss-snippet` on a webserver to publish snippets. See [/AniNIX/Kapisi/src/branch/main/roles/Foundation/files/custom/public/assets/js/aninix.js#L2](aninix.js#L2) for options to consume these snippets in a webpage. This allows each repo to publish new updates in one place and webpages to show it in addition to [https://singularity.aninix.net](AniNIX/Singularity) and other readers. +* the `rss/` directory will be used by `Hooks/scripts.d/generate-rss-snippet` on a webserver to publish snippets. See [/AniNIX/Kapisi/src/branch/main/roles/Foundation/files/custom/public/assets/js/aninix.js#L2](aninix.js#L2) for options to consume these snippets in a web page. This allows each repo to publish new updates in one place and webpages to show it in addition to [https://singularity.aninix.net](AniNIX/Singularity) and other readers. * The `tests/` directory will be used by `Hooks/scripts.d/pytest` to run Python unit tests on a repo. Any code should be wrapped with automated regressions. * The `precommit-hooks` directory will be used by `Hooks/scripts.d/local-hooks`. This allows individual repos to use our general hooks and then add on specific tests on top, such as lint checkers or consistency checkers. +* A touch file of `.wiki-repo` will bypass code compilation & packaging tests. ## Standard Libraries