Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
3538b44a20
|
|||
5bcfefb279
|
|||
227a50ef37
|
|||
917e8233c5
|
|||
a0221a43a5
|
10
Hooks/scripts.d/find-data-files
Executable file
10
Hooks/scripts.d/find-data-files
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# We don't want to commit data files, with the exceptions being our GPG public key and organization logo in PNG & ASCII format.
|
||||||
|
result="$(git ls-files | xargs -n 1 file | grep -Ev ASCII\ text\|JSON\|empty\|Unicode\ text | grep -vE '^Resources/logo.png|^Resources/ascii.txt|^Resources/public.gpg')"
|
||||||
|
if [ -n "$result" ]; then
|
||||||
|
echo "These files need to be evaluated -- generally, don't commit data files to Git."
|
||||||
|
echo "$result"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exit 0
|
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
if [ -d precommit-hooks ]; then
|
if [ -d precommit-hooks ]; then
|
||||||
for script in `find precommit-hooks -type f`; do
|
for script in `find precommit-hooks -type f`; do
|
||||||
|
echo Running "$script"
|
||||||
if ! bash "$script"; then
|
if ! bash "$script"; then
|
||||||
echo "Local script $script failed checks."
|
echo "Local script $script failed checks."
|
||||||
exit 1
|
exit 1
|
||||||
|
4
Hooks/scripts.d/make-sure-hooks-synced
Executable file
4
Hooks/scripts.d/make-sure-hooks-synced
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
if [ `git ls-files -m | grep -E '^Hooks/scripts.d|^precommit-hooks/' | wc -l` != '0' ]; then
|
||||||
|
echo 'Hooks have changed and need to be added. Run `git add precommit-hooks`'
|
||||||
|
exit 1
|
||||||
|
fi
|
2
Makefile
2
Makefile
@@ -1,5 +1,5 @@
|
|||||||
installdir = ${pkgdir}/opt/aninix/Uniglot/
|
installdir = ${pkgdir}/opt/aninix/Uniglot/
|
||||||
targets = Bash C CSharp Hooks
|
targets = Bash C CSharp Python Hooks
|
||||||
|
|
||||||
compile:
|
compile:
|
||||||
@echo Nothing to compile.
|
@echo Nothing to compile.
|
||||||
|
6
PKGBUILD
6
PKGBUILD
@@ -3,12 +3,8 @@ makedepends=('make>=4.2','gcc','mono')
|
|||||||
checkdepends=()
|
checkdepends=()
|
||||||
optdepends=()
|
optdepends=()
|
||||||
pkgname="$(git config remote.origin.url | rev | cut -f 1 -d '/' | rev | sed 's/.git$//')"
|
pkgname="$(git config remote.origin.url | rev | cut -f 1 -d '/' | rev | sed 's/.git$//')"
|
||||||
pkgver="$(git describe --tag --abbrev=0)"."$(git rev-parse --short HEAD)"
|
pkgver="$(git describe --tag --abbrev=0)"."$(( `git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit` + 1 ))"."$(git rev-parse --short HEAD)"
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgrel() {
|
|
||||||
echo $(( `git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit` + 1 ))
|
|
||||||
}
|
|
||||||
epoch="$(git log | grep -c commit)"
|
|
||||||
pkgdesc="$(head -n 1 README.md)"
|
pkgdesc="$(head -n 1 README.md)"
|
||||||
arch=("x86_64")
|
arch=("x86_64")
|
||||||
url="$(git config remote.origin.url | sed 's/.git$//')"
|
url="$(git config remote.origin.url | sed 's/.git$//')"
|
||||||
|
@@ -25,6 +25,14 @@ The Hooks folder includes a standard pre-commit and pre-receive that will be enf
|
|||||||
|
|
||||||
Notably, each repo that subscribes to this enforcement can also commit their own standards in addition to global standards. Python tests should go in a folder called `tests/` and scripts in a folder called `precommit-hooks/`. These will be run in addition to the global hooks.
|
Notably, each repo that subscribes to this enforcement can also commit their own standards in addition to global standards. Python tests should go in a folder called `tests/` and scripts in a folder called `precommit-hooks/`. These will be run in addition to the global hooks.
|
||||||
|
|
||||||
|
### Consumed Directories
|
||||||
|
|
||||||
|
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 `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.
|
||||||
|
|
||||||
## Standard Libraries
|
## Standard Libraries
|
||||||
|
|
||||||
Each language for which we have libraries should have its own folder. Breakdown within each of these may be broken up by line count or topic, at the author's discretion. Once an include standard has been set, though, it should be preserved. For example, if functions in [the Bash header](./Bash/header) are to be broken out into subordinate files, then the Bash header should include these files that contain functions formally in itself.
|
Each language for which we have libraries should have its own folder. Breakdown within each of these may be broken up by line count or topic, at the author's discretion. Once an include standard has been set, though, it should be preserved. For example, if functions in [the Bash header](./Bash/header) are to be broken out into subordinate files, then the Bash header should include these files that contain functions formally in itself.
|
||||||
|
24
Resources/ascii.txt
Normal file
24
Resources/ascii.txt
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
...........................................
|
||||||
|
...........................................
|
||||||
|
.....................4HHH...................
|
||||||
|
..................4HHHHHHHHH................
|
||||||
|
...............4HHHHHHHHHHHHHH..............
|
||||||
|
...........4HHHHHHHH.....4HHHHHHHH...........
|
||||||
|
........4HHHHHHHH...........4HHHHHHHH........
|
||||||
|
.......4HHHHHH.................4HHHHHH.......
|
||||||
|
.......4HHHH.....................4HHHH.......
|
||||||
|
.......4HHHH....4HHH....#.........4HHHH.......
|
||||||
|
.......4HHHH....4HHH.....###......4HHHH.......
|
||||||
|
.......4HHHH....4HHH........##....4HHHH.......
|
||||||
|
.......4HHHH....4HHH........##....4HHHH.......
|
||||||
|
.......4HHHH....4HHH.....###......4HHHH.......
|
||||||
|
.......4HHHH....4HHH....#.........4HHHH.......
|
||||||
|
.......4HHHH.....................4HHHH.......
|
||||||
|
.......4HHHHHH.................4HHHHHH.......
|
||||||
|
........4HHHHHHHH...........4HHHHHHHH........
|
||||||
|
...........4HHHHHHHH......4HHHHHHHH..........
|
||||||
|
.............4HHHHHHHH.4HHHHHHHH.............
|
||||||
|
.................4HHHHHHHHHH................
|
||||||
|
....................4HHHH...................
|
||||||
|
...........................................
|
||||||
|
...........................................
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
16
Resources/public.gpg
Normal file
16
Resources/public.gpg
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
mDMEXODEBRYJKwYBBAHaRw8BAQdAfb/AxMT/BxuZ3YxVZvzGeHamqApB4Cm7mrol
|
||||||
|
N/KdMxa0MERhcmtGZWF0aGVyIDxpcmNzOi8vYW5pbml4Lm5ldDo2Njk3L0RhcmtG
|
||||||
|
ZWF0aGVyPoiQBBMWCAA4AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEEkE3m
|
||||||
|
J1V5y1idhXIMHMHj9O0G8pYFAl4NpXUACgkQHMHj9O0G8pZGsgEAu29Fj+vDSnUF
|
||||||
|
jsDwTgSAZRSiEMIzO0hSTOL//uwaSgQA/iESpuKyfUUoteJhSvwI6PTt0D23F4AR
|
||||||
|
vXWh0f5LqTgLiJAEExYIADgWIQSQTeYnVXnLWJ2FcgwcweP07QbylgUCXg2A8QIb
|
||||||
|
AwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRAcweP07QbylvaeAQDvnhvFK3Qt
|
||||||
|
BNLGwwV2w85SCm2ITFK6l4ClmO/EcreNzAEAlNHSEquQRaFwKQD7IUbj1dPllOPY
|
||||||
|
RUsFyqZetReWlAG4OARc4MQFEgorBgEEAZdVAQUBAQdA/TfytUcx/gmKbkMLF1hd
|
||||||
|
49FZIyoq2MKMrjFEHWI/KykDAQgHiHgEGBYIACACGwwWIQSQTeYnVXnLWJ2Fcgwc
|
||||||
|
weP07QbylgUCXg2ltwAKCRAcweP07Qbylo3PAP0W5BOTL8YMwLbwYzNlxFpiNSCn
|
||||||
|
GHXfxI5/3QRB8Q5kCgD+Og0Y0Nve58yZj+DkqFCpI0TJReKj+bavK7TJ9ElL8wo=
|
||||||
|
=VnrT
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
Reference in New Issue
Block a user