Last active
April 27, 2019 19:45
-
-
Save bkazez/7596ec8dea95646dca5630bf49188682 to your computer and use it in GitHub Desktop.
Get changed paths from middleman s3_sync, for CDN invalidation (Cloudfront, etc)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# additions aren't necessary for cache invalidation | |
changedpaths="$(middleman s3_sync -B | grep -E "^ +(updated|remove)" | awk '{print $2}' | sed -e 's/^build//')" | |
aws cloudfront create-invalidation --distribution-id xxx --paths $changedpaths --profile yyy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment