#!/usr/bin/env bash set -e # shellcheck disable=SC1090 . "$( dirname "${BASH_SOURCE[0]}" )/shared-functions" DISTRIBUTION=$(get-output site CloudfrontDistribution) INVALIDATION=$(aws cloudfront create-invalidation --paths '/*' --distribution-id "$DISTRIBUTION" --query Invalidation.Id --output text) aws cloudfront wait invalidation-completed --distribution-id "$DISTRIBUTION" --id "$INVALIDATION"