1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#!/bin/sh -e
first=$1
second=$2
if [ -z "$first" ]; then
echo "Usage: compare <branch name A> [<branch name B>]"
echo ""
echo "The second argument defaults to the current branch if not specified"
exit 1
fi
# Remember the branch we're on
currentbranch=`git symbolic-ref --short HEAD`
if [ -z "$second" ]; then
second=$currentbranch
fi
firstdir=comparison/first
seconddir=comparison/second
# Make sure the output directory exists
mkdir -p comparison
# Remove any previous builds
rm -fr $firstdir
rm -fr $seconddir
export BREATHE_COMPARE=True
# Checkout the first target
echo git checkout $first
git checkout $first
# Run doxygen for this state
(cd ../examples/specific; make)
(cd ../examples/tinyxml; make)
(cd ../examples/doxygen; make)
# Clean current sphinx build directory
make clean
# Make sure the BUILDDIR variable can be overridden in the Makefile. Required for older commits
sed -i 's/BUILDDIR = build/BUILDDIR ?= build/g' Makefile
# Build into our first comparison directory
make html BUILDDIR=$firstdir
# Reset the Makefile to its state for this commit
git checkout Makefile
# Checkout the second target and repeat
echo git checkout $second
git checkout $second
(cd ../examples/specific; make)
(cd ../examples/tinyxml; make)
(cd ../examples/doxygen; make)
make clean
sed -i 's/BUILDDIR = build/BUILDDIR ?= build/g' Makefile
make html BUILDDIR=$seconddir
git checkout Makefile
# Return to our current branch
echo git checkout $currentbranch
git checkout $currentbranch
# Launch meld to compare the two html directories
echo meld $firstdir/html $seconddir/html
meld $firstdir/html $seconddir/html
|