summaryrefslogtreecommitdiffstats
path: root/hugolib/hugo_sites_build.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-07-11 19:23:22 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-07-11 20:40:04 +0200
commit6b6dcb44a014699c289bf32fe57d4c4216777be0 (patch)
treeee7c4a831be73ec9e1656690550bccb8ee913f97 /hugolib/hugo_sites_build.go
parentd96f2a460f58e91d8f6253a489d4879acfec6916 (diff)
Flush partialCached cache on rebuilds
Fixes #4931
Diffstat (limited to 'hugolib/hugo_sites_build.go')
-rw-r--r--hugolib/hugo_sites_build.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go
index 7769b68dc..8ca2128a1 100644
--- a/hugolib/hugo_sites_build.go
+++ b/hugolib/hugo_sites_build.go
@@ -28,6 +28,7 @@ import (
// Build builds all sites. If filesystem events are provided,
// this is considered to be a potential partial rebuild.
func (h *HugoSites) Build(config BuildCfg, events ...fsnotify.Event) error {
+
if h.Metrics != nil {
h.Metrics.Reset()
}
@@ -42,6 +43,10 @@ func (h *HugoSites) Build(config BuildCfg, events ...fsnotify.Event) error {
conf.whatChanged = &whatChanged{source: true, other: true}
}
+ for _, s := range h.Sites {
+ s.Deps.BuildStartListeners.Notify()
+ }
+
if len(events) > 0 {
// Rebuild
if err := h.initRebuild(conf); err != nil {