diff options
author | Robert van Gent <rvangent@google.com> | 2019-05-01 13:25:06 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-05-06 21:09:33 +0200 |
commit | f4956d9aae69b1cb5715114cf5242fd80a9cabc7 (patch) | |
tree | d6dd5884a457576ccd826c41deb18b5ee1593db3 /commands | |
parent | 2838d58b1daa0f6a337125c5a64d06215901c5d6 (diff) |
deploy: Support invalidating a CloudFront CDN cache
Diffstat (limited to 'commands')
-rw-r--r-- | commands/deploy.go | 1 | ||||
-rw-r--r-- | commands/hugo.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/commands/deploy.go b/commands/deploy.go index 14e7e1627..6f8eac357 100644 --- a/commands/deploy.go +++ b/commands/deploy.go @@ -68,6 +68,7 @@ func newDeployCmd() *deployCmd { cc.cmd.Flags().Bool("confirm", false, "ask for confirmation before making changes to the target") cc.cmd.Flags().Bool("dryRun", false, "dry run") cc.cmd.Flags().Bool("force", false, "force upload of all files") + cc.cmd.Flags().Bool("invalidateCDN", true, "invalidate the CDN cache via the CloudFrontDistributionID listed in the deployment target") cc.cmd.Flags().Int("maxDeletes", 256, "maximum # of files to delete, or -1 to disable") return cc diff --git a/commands/hugo.go b/commands/hugo.go index c6819b054..07f2b95a2 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -213,6 +213,7 @@ func initializeFlags(cmd *cobra.Command, cfg config.Provider) { "force", "gc", "i18n-warnings", + "invalidateCDN", "layoutDir", "logFile", "maxDeletes", |