mirror of
https://github.com/firehol/firehol.git
synced 2024-06-28 09:52:19 +00:00
55 lines
1.2 KiB
Bash
Executable File
55 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# When run from the top-level repository, performs a complete clean
|
|
# and maintainer-mode rebuild of the FireHOL package.
|
|
|
|
if [ ! -f .gitignore -o ! -f configure.ac -o ! -x autogen.sh ]
|
|
then
|
|
echo "Run as ./packaging/git-build from an autotools git repository"
|
|
exit 1
|
|
fi
|
|
|
|
# If we are genuinely in a git repo, try to clean it up, otherwise
|
|
# just make the assumption
|
|
if [ -d .git ]
|
|
then
|
|
if [ -n "$TRAVIS_TAG" ]
|
|
then
|
|
echo "Checking we have a good signature during CI build..."
|
|
echo "Checking tag: $TRAVIS_TAG"
|
|
git tag -v "$TRAVIS_TAG" 2>&1 | tee /tmp/tagcheck
|
|
grep -iq "gpg. good signature" /tmp/tagcheck
|
|
status=$?
|
|
rm -f /tmp/tagcheck
|
|
if [ $status -ne 0 ]
|
|
then
|
|
exit $status
|
|
fi
|
|
fi
|
|
|
|
clean=$(git status -s | grep "^?")
|
|
|
|
if [ "$clean" ]
|
|
then
|
|
if [ "$1" != "-ok" ]
|
|
then
|
|
echo "Warning: this script runs: git clean -d -f -x"
|
|
echo " ensure all required ?? files are added, then re-run with '-ok'"
|
|
git status -s | grep '^?'
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
set -e
|
|
git clean -d -f -x
|
|
set +e
|
|
fi
|
|
|
|
set -e
|
|
./autogen.sh
|
|
./configure --enable-maintainer-mode
|
|
set +e
|
|
make dist
|
|
status=$?
|
|
exit $status
|