summaryrefslogtreecommitdiffstats
path: root/deps
diff options
context:
space:
mode:
Diffstat (limited to 'deps')
-rw-r--r--deps/deps.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/deps/deps.go b/deps/deps.go
index 309555080..4d1812015 100644
--- a/deps/deps.go
+++ b/deps/deps.go
@@ -33,7 +33,6 @@ import (
// There will be normally only one instance of deps in play
// at a given time, i.e. one per Site built.
type Deps struct {
-
// The logger to use.
Log loggers.Logger `json:"-"`
@@ -77,6 +76,9 @@ type Deps struct {
// BuildStartListeners will be notified before a build starts.
BuildStartListeners *Listeners
+ // BuildEndListeners will be notified after a build finishes.
+ BuildEndListeners *Listeners
+
// Resources that gets closed when the build is done or the server shuts down.
BuildClosers *Closers
@@ -97,7 +99,6 @@ func (d Deps) Clone(s page.Site, conf config.AllProvider) (*Deps, error) {
}
return &d, nil
-
}
func (d *Deps) SetTempl(t *tpl.TemplateHandlers) {
@@ -132,6 +133,10 @@ func (d *Deps) Init() error {
d.BuildStartListeners = &Listeners{}
}
+ if d.BuildEndListeners == nil {
+ d.BuildEndListeners = &Listeners{}
+ }
+
if d.BuildClosers == nil {
d.BuildClosers = &Closers{}
}