diff options
Diffstat (limited to 'hugolib/hugo_sites_build.go')
-rw-r--r-- | hugolib/hugo_sites_build.go | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go index bd5c2b661..c1a4ab190 100644 --- a/hugolib/hugo_sites_build.go +++ b/hugolib/hugo_sites_build.go @@ -44,7 +44,6 @@ 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.running { // Make sure we don't trigger rebuilds in parallel. h.runningMu.Lock() @@ -70,7 +69,6 @@ func (h *HugoSites) Build(config BuildCfg, events ...fsnotify.Event) error { to <- h.pickOneAndLogTheRest(errors) close(to) - }(errCollector, errs) if h.Metrics != nil { @@ -186,7 +184,6 @@ func (h *HugoSites) Build(config BuildCfg, events ...fsnotify.Event) error { } return nil - } // Build lifecycle methods below. @@ -242,11 +239,9 @@ func (h *HugoSites) process(config *BuildCfg, init func(config *BuildCfg) error, } return firstSite.process(*config) - } func (h *HugoSites) assemble(bcfg *BuildCfg) error { - if len(h.Sites) > 1 { // The first is initialized during process; initialize the rest for _, site := range h.Sites[1:] { @@ -269,7 +264,6 @@ func (h *HugoSites) assemble(bcfg *BuildCfg) error { } return nil - } func (h *HugoSites) render(config *BuildCfg) error { @@ -327,7 +321,6 @@ func (h *HugoSites) render(config *BuildCfg) error { } } - } if !config.SkipRender { @@ -366,7 +359,6 @@ func (h *HugoSites) postProcess() error { b, err := json.MarshalIndent(jsConfig, "", " ") if err != nil { h.Log.Warnf("Failed to create jsconfig.json: %s", err) - } else { filename := filepath.Join(assetsDir, "jsconfig.json") if h.running { @@ -400,7 +392,6 @@ func (h *HugoSites) postProcess() error { g, _ := workers.Start(context.Background()) handleFile := func(filename string) error { - content, err := afero.ReadFile(h.BaseFs.PublishFs, filename) if err != nil { return err @@ -443,7 +434,6 @@ func (h *HugoSites) postProcess() error { } return nil - } _ = afero.Walk(h.BaseFs.PublishFs, "", func(path string, info os.FileInfo, err error) error { @@ -468,7 +458,6 @@ func (h *HugoSites) postProcess() error { } return g.Wait() - } type publishStats struct { @@ -512,5 +501,4 @@ func (h *HugoSites) writeBuildStats() error { } return nil - } |