summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/proof13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/proof b/tools/proof
index 7acc92fd..0509c57e 100755
--- a/tools/proof
+++ b/tools/proof
@@ -1,13 +1,21 @@
-#!/bin/sh
+#!/bin/bash
set -e
+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 +23,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