summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-01-10 09:34:40 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-01-10 09:34:40 +0100
commit768ec5df9fa8f91610ee80a9e6194f94a7dbe117 (patch)
tree05476bda5fcd0dd93cc20b9481e55fb0a320ec41
parent238e7f7fbe123c33e33a81b79d53e25c392797b7 (diff)
Remove the --cleanDestinationDir flag
This is no longer supported. Since Hugo 0.32 we do static sync and build in parallel. Closes #4246
-rw-r--r--commands/hugo.go5
-rw-r--r--hugolib/config.go1
2 files changed, 0 insertions, 6 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 0e7b755f7..01afaaa4c 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -237,7 +237,6 @@ func initRootPersistentFlags() {
// initHugoBuildCommonFlags initialize common flags related to the Hugo build.
// Called by initHugoBuilderFlags.
func initHugoBuildCommonFlags(cmd *cobra.Command) {
- cmd.Flags().Bool("cleanDestinationDir", false, "remove files from destination not found in static directories")
cmd.Flags().BoolP("buildDrafts", "D", false, "include content marked as draft")
cmd.Flags().BoolP("buildFuture", "F", false, "include content with publishdate in the future")
cmd.Flags().BoolP("buildExpired", "E", false, "include expired content")
@@ -484,7 +483,6 @@ func createLogger(cfg config.Provider) (*jww.Notepad, error) {
func (c *commandeer) initializeFlags(cmd *cobra.Command) {
persFlagKeys := []string{"debug", "verbose", "logFile"}
flagKeys := []string{
- "cleanDestinationDir",
"buildDrafts",
"buildFuture",
"buildExpired",
@@ -724,9 +722,6 @@ func (c *commandeer) copyStaticTo(dirs *src.Dirs, publishDir string) (uint64, er
syncer.NoChmod = c.Cfg.GetBool("noChmod")
syncer.SrcFs = fs
syncer.DestFs = c.Fs.Destination
- // Now that we are using a unionFs for the static directories
- // We can effectively clean the publishDir on initial sync
- syncer.Delete = c.Cfg.GetBool("cleanDestinationDir")
if syncer.Delete {
c.Logger.INFO.Println("removing all files from destination that don't exist in static dirs")
diff --git a/hugolib/config.go b/hugolib/config.go
index 8e06d3e8e..ce0f5bac9 100644
--- a/hugolib/config.go
+++ b/hugolib/config.go
@@ -164,7 +164,6 @@ func loadDefaultSettingsFor(v *viper.Viper) error {
return err
}
- v.SetDefault("cleanDestinationDir", false)
v.SetDefault("watch", false)
v.SetDefault("metaDataFormat", "toml")
v.SetDefault("disable404", false)