ledger/tools/proof
John Wiegley b1b4e2aadf Add support for typed metadata
The metadata construct 'Key: Value' is now just a special case for
'Key:: "Value"'.  Another after a :: in metadata setting is parsed as a
full value expression and typed as such.  For example:

  ; Key:: $400 + $500

  ledger -l 'tag("Key") < $1000'
2010-06-12 15:43:00 -04:00

34 lines
720 B
Bash
Executable file

#!/bin/bash
set -e
cd ~/src/ledger
VERSION=$(git describe --all --long)
if [[ -f ~/Products/last-proofed && \
$(< ~/Products/last-proofed) = $VERSION ]]; then
echo "No need to run tools/proof again"
exit 0
fi
rm -fr ~/Products/ledger-proof
time ./acprep --enable-cache --enable-doxygen \
--universal -j16 --warn proof 2>&1 | \
tee ~/Desktop/proof.log
if egrep -q '(ERROR|CRITICAL)' ~/Desktop/proof.log; then
if [[ "$1" = "--alert" ]]; then
notify "Ledger proof build FAILED"
else
echo "Ledger proof build FAILED"
exit 1
fi
else
echo "Ledger proof build succeeded"
echo $VERSION > ~/Products/last-proofed
mv ~/Desktop/proof.log /tmp
fi
exit 0