summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--src/xact.cc4
-rwxr-xr-xtools/proof15
3 files changed, 14 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index ac30caf2..e622c64c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.timestamp
*.backup
*.elc
*.pyc
diff --git a/src/xact.cc b/src/xact.cc
index 34b8c340..3670cb94 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -457,10 +457,6 @@ bool xact_t::valid() const
DEBUG("ledger.validate", "xact_t: ! _date");
return false;
}
- if (! has_flags(ITEM_GENERATED | ITEM_TEMP) && ! journal) {
- DEBUG("ledger.validate", "xact_t: ! journal");
- return false;
- }
foreach (post_t * post, posts)
if (post->xact != this || ! post->valid()) {
diff --git a/tools/proof b/tools/proof
index 7acc92fd..ede22558 100755
--- a/tools/proof
+++ b/tools/proof
@@ -1,13 +1,23 @@
-#!/bin/sh
+#!/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*
./acprep -j16 --warn proof 2>&1 | tee ~/Desktop/proof.log
if egrep -q '(ERROR|CRITICAL)' ~/Desktop/proof.log; then
- if [ "$1" = "--alert" ]; then
+ if [[ "$1" = "--alert" ]]; then
notify "Ledger proof build FAILED"
else
echo "Ledger proof build FAILED"
@@ -15,6 +25,7 @@ if egrep -q '(ERROR|CRITICAL)' ~/Desktop/proof.log; then
fi
else
echo "Ledger proof build succeeded"
+ echo $VERSION > ~/Products/last-proofed
fi
exit 0