mirror of
https://git.dn42.dev/dn42/registry.git
synced 2025-01-17 05:07:28 +01:00
Merge branch 'master' of git.dn42:dn42/registry
This commit is contained in:
commit
989829cf37
11
README.md
11
README.md
@ -1,8 +1,9 @@
|
||||
# Tips for a successful Pull Request
|
||||
1. Squash your commits -- Keep the changes simple to read.
|
||||
2. Run the schema check -- Make sure the changes are valid!
|
||||
3. Sign your commit -- Makes it easier to verify.
|
||||
4. Bonus: add your pgp fingerprint to your MNT `auth: pgp-fingerprint <pgp-fingerprint>` [[See XUU-MNT example](data/mntner/XUU-MNT)]
|
||||
3. ???
|
||||
4. Profit!
|
||||
2. Run the schema check -- Make sure the changes are valid! Run `./check-my-stuff YOUROWN-MNT`
|
||||
3. BONUS: install the commit hook! Run `./install-commit-hook YOUROWN-MNT`
|
||||
4. Sign your commit -- Makes it easier to verify.
|
||||
5. Bonus: add your pgp fingerprint to your MNT `auth: pgp-fingerprint <pgp-fingerprint>` [[See XUU-MNT example](data/mntner/XUU-MNT)]
|
||||
6. ???
|
||||
7. Profit!
|
||||
|
||||
|
@ -6,8 +6,9 @@ if [ $# -eq 0 ]
|
||||
exit
|
||||
fi
|
||||
|
||||
BASE=$(realpath $0)
|
||||
BASE=$(dirname $BASE)
|
||||
cd $BASE
|
||||
BASE="$(realpath "$0")"
|
||||
BASE="$(dirname "$BASE")"
|
||||
cd "$BASE" || exit 1
|
||||
|
||||
utils/schema-check/dn42-schema.py scan data/ -m "$1" || ( echo "Schema validation failed, please check above!" ; exit 1 )
|
||||
|
||||
utils/schema-check/dn42-schema.py scan data/ -m $1
|
||||
|
20
install-commit-hook
Executable file
20
install-commit-hook
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "Usage: $0 YOUR-MNT"
|
||||
exit
|
||||
fi
|
||||
|
||||
BASE="$(realpath "$0")"
|
||||
BASE="$(dirname "$BASE")"
|
||||
cd "$BASE" || exit 1
|
||||
|
||||
cat > .git/hooks/pre-commit <<EOF
|
||||
#!/bin/sh
|
||||
|
||||
./check-my-stuff "$1" || exit 1
|
||||
|
||||
EOF
|
||||
chmod +x .git/hooks/pre-commit
|
||||
|
@ -266,8 +266,10 @@ def __scan_index(idx, schemas, mntner):
|
||||
continue
|
||||
c = FileDOM(v[0])
|
||||
ck = s.check_file(c, idx.keys())
|
||||
if not ck:
|
||||
ok = False
|
||||
if ck == "INFO" and ok != "FAIL":
|
||||
ok = ck
|
||||
if ck == "FAIL":
|
||||
ok = ck
|
||||
|
||||
return ok
|
||||
|
||||
@ -397,5 +399,10 @@ if __name__ == '__main__':
|
||||
elif args["command"] == "scan":
|
||||
import time
|
||||
log.notice("## Scan Started at %s" %(time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime())))
|
||||
scan_files(args["path"], args["use_mntner"])
|
||||
ck = scan_files(args["path"], args["use_mntner"])
|
||||
log.notice("## Scan Completed at %s" %(time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime())))
|
||||
|
||||
if ck == "INFO":
|
||||
sys.exit(2)
|
||||
elif ck == "FAIL":
|
||||
sys.exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user