Squashed 'tools/' changes from f7f1370..fb5985b

fb5985b Merge pull request #14 from weaveworks/increase-image-timeout
b42e792 Merge pull request #13 from weaveworks/move-gce-scripts
c5800d0 Increase rebuild-image image lifetime to 3 days.

git-subtree-dir: tools
git-subtree-split: fb5985b6c3
This commit is contained in:
Tom Wilkie
2016-01-13 15:58:47 -08:00
parent 98bca0b552
commit 795436ef81

View File

@@ -52,7 +52,8 @@ if has_changes $cached_revision $CIRCLE_SHA1 ; then
exit 0
fi
if [ "$(commit_timestamp $cached_revision)" -lt "$(( $(date +%s) - 86400 ))" ]; then
IMAGE_TIMEOUT="$(( 3 * 24 * 60 * 60 ))"
if [ "$(commit_timestamp $cached_revision)" -lt "${IMAGE_TIMEOUT}" ]; then
echo ">>> Image is more the 24hrs old; rebuilding"
rebuild
exit 0