From c5800d0af1efeeba332b5f22d7286c86ca9db137 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Tue, 12 Jan 2016 13:28:33 +0000 Subject: [PATCH] Increase rebuild-image image lifetime to 3 days. --- rebuild-image | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rebuild-image b/rebuild-image index df3a371c4..ea54f7403 100755 --- a/rebuild-image +++ b/rebuild-image @@ -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