Internal repo consistency checks
This commit is contained in:
parent
3d56309766
commit
0e81be663f
2
Makefile
2
Makefile
|
@ -1,3 +1,5 @@
|
|||
__ignored__ := $(shell ./setup.sh)
|
||||
|
||||
# Use cargo release to manage publication and versions etc.
|
||||
#
|
||||
# cargo install cargo-release
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
exec 1>&2
|
||||
|
||||
failed=
|
||||
cmp_and_fail() {
|
||||
if ! cmp "$1" "$2"
|
||||
then
|
||||
failed=failed
|
||||
fi
|
||||
}
|
||||
|
||||
COMMAND=cmp_and_fail
|
||||
if [ "$1" = "--fix" ];
|
||||
then
|
||||
COMMAND=cp
|
||||
fi
|
||||
|
||||
# Ensure that various copies of cross-package data are identical.
|
||||
${COMMAND} syndicate/protocols/schema-bundle.bin syndicate-schema-plugin/schema-bundle.bin
|
||||
|
||||
[ -z "$failed" ]
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Set up a git checkout of this repository for local dev use.
|
||||
|
||||
exec 2>/dev/tty 1>&2
|
||||
|
||||
set -e
|
||||
|
||||
[ -d .git ] || exit 0
|
||||
|
||||
for fullhook in ./git-hooks/*
|
||||
do
|
||||
hook=$(basename "$fullhook")
|
||||
[ -L .git/hooks/$hook ] || (
|
||||
echo "Installing $hook hook"
|
||||
ln -s ../../git-hooks/$hook .git/hooks/$hook
|
||||
)
|
||||
done
|
Loading…
Reference in New Issue