Skip to content

Commit

Permalink
Increase rebuild-image image lifetime to 3 days.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwilkie committed Jan 12, 2016
1 parent 0c4636a commit c5800d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rebuild-image
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5800d0

Please sign in to comment.