Since no one uses this, we should remove commit hooks
This commit is contained in:
parent
d5d476a3a1
commit
f3761ed28e
28
autogen.sh
28
autogen.sh
@ -16,34 +16,6 @@ if [ -n "$WSL_DISTRO_NAME" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Git hooks should come before autoreconf.
|
|
||||||
if [ -d .git ]; then
|
|
||||||
if [ ! -d .git/hooks ]; then
|
|
||||||
mkdir .git/hooks || exit $?
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$no_links" ]; then
|
|
||||||
echo "Linux ln does not work on shared Windows file system in WSL."
|
|
||||||
if [ ! -e .git/hooks/pre-commit ]; then
|
|
||||||
echo "The pre-commit.sh file will not be copied to .git/hooks/pre-commit"
|
|
||||||
# shell scripts do not work on Windows; TODO create equivalent batch file
|
|
||||||
# cp ./pre-commit.sh .git/hooks/pre-commit || exit $?
|
|
||||||
fi
|
|
||||||
if [ ! -e .git/hooks/pre-push ]; then
|
|
||||||
echo "The pre-push.sh file will not be copied to .git/hooks/pre-commit"
|
|
||||||
# shell scripts do not work on Windows; TODO create equivalent batch file
|
|
||||||
# cp ./pre-push.sh .git/hooks/pre-push || exit $?
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ ! -e .git/hooks/pre-commit ]; then
|
|
||||||
ln -s ../../pre-commit.sh .git/hooks/pre-commit || exit $?
|
|
||||||
fi
|
|
||||||
if [ ! -e .git/hooks/pre-push ]; then
|
|
||||||
ln -s ../../pre-push.sh .git/hooks/pre-push || exit $?
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if and as needed, create empty dummy versions of various files, mostly
|
# if and as needed, create empty dummy versions of various files, mostly
|
||||||
# associated with fips/self-test and asynccrypt:
|
# associated with fips/self-test and asynccrypt:
|
||||||
|
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Our "pre-commit" hook.
|
|
||||||
|
|
||||||
# save current config
|
|
||||||
echo "\n\nSaving current config\n\n"
|
|
||||||
cp config.status tmp.status
|
|
||||||
cp wolfssl/options.h tmp.options.h
|
|
||||||
|
|
||||||
# stash modified files, if any, that are not part of this commit, don't test
|
|
||||||
# them
|
|
||||||
STASHED=0
|
|
||||||
if ! git diff --quiet
|
|
||||||
then
|
|
||||||
STASHED=1
|
|
||||||
echo "\n\nStashing modified files not part of commit\n\n"
|
|
||||||
git stash -q --keep-index
|
|
||||||
fi
|
|
||||||
|
|
||||||
# do the commit tests
|
|
||||||
echo "\n\nRunning commit tests...\n\n"
|
|
||||||
./commit-tests.sh
|
|
||||||
RESULT=$?
|
|
||||||
|
|
||||||
# restore modified files not part of this commit
|
|
||||||
if test $STASHED -eq 1
|
|
||||||
then
|
|
||||||
echo "\n\nPopping stashed modified files not part of commit\n"
|
|
||||||
git stash pop -q
|
|
||||||
fi
|
|
||||||
|
|
||||||
# restore current config
|
|
||||||
echo "\nRestoring current config\n"
|
|
||||||
mv tmp.status config.status
|
|
||||||
# don't show output in case error from above
|
|
||||||
./config.status >/dev/null 2>&1
|
|
||||||
mv tmp.options.h wolfssl/options.h
|
|
||||||
make clean >/dev/null 2>&1
|
|
||||||
make -j 8 >/dev/null 2>&1
|
|
||||||
|
|
||||||
[ $RESULT -ne 0 ] && echo "\nOops, your commit failed\n" && exit 1
|
|
||||||
|
|
||||||
echo "\nCommit tests passed!\n"
|
|
||||||
exit 0
|
|
19
pre-push.sh
19
pre-push.sh
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Our "pre-push" hook.
|
|
||||||
|
|
||||||
RESULT=0
|
|
||||||
|
|
||||||
if [ -d ./fips ];
|
|
||||||
then
|
|
||||||
echo "\n\nTesting with FIPS release code...\n\n"
|
|
||||||
./fips-check.sh
|
|
||||||
RESULT=$?
|
|
||||||
[ $RESULT -ne 0 ] && echo -e "\n\nFIPS build test failed" && exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ $RESULT -ne 0 ] && echo "\nOops, your push failed\n" && exit 1
|
|
||||||
|
|
||||||
echo "\nPush tests passed!\n"
|
|
||||||
exit 0
|
|
Loading…
Reference in New Issue
Block a user