mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Remove the --cleanDestinationDir flag
This is no longer supported. Since Hugo 0.32 we do static sync and build in parallel. Closes #4246
This commit is contained in:
parent
238e7f7fbe
commit
768ec5df9f
2 changed files with 0 additions and 6 deletions
|
@ -237,7 +237,6 @@ func initRootPersistentFlags() {
|
||||||
// initHugoBuildCommonFlags initialize common flags related to the Hugo build.
|
// initHugoBuildCommonFlags initialize common flags related to the Hugo build.
|
||||||
// Called by initHugoBuilderFlags.
|
// Called by initHugoBuilderFlags.
|
||||||
func initHugoBuildCommonFlags(cmd *cobra.Command) {
|
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("buildDrafts", "D", false, "include content marked as draft")
|
||||||
cmd.Flags().BoolP("buildFuture", "F", false, "include content with publishdate in the future")
|
cmd.Flags().BoolP("buildFuture", "F", false, "include content with publishdate in the future")
|
||||||
cmd.Flags().BoolP("buildExpired", "E", false, "include expired content")
|
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) {
|
func (c *commandeer) initializeFlags(cmd *cobra.Command) {
|
||||||
persFlagKeys := []string{"debug", "verbose", "logFile"}
|
persFlagKeys := []string{"debug", "verbose", "logFile"}
|
||||||
flagKeys := []string{
|
flagKeys := []string{
|
||||||
"cleanDestinationDir",
|
|
||||||
"buildDrafts",
|
"buildDrafts",
|
||||||
"buildFuture",
|
"buildFuture",
|
||||||
"buildExpired",
|
"buildExpired",
|
||||||
|
@ -724,9 +722,6 @@ func (c *commandeer) copyStaticTo(dirs *src.Dirs, publishDir string) (uint64, er
|
||||||
syncer.NoChmod = c.Cfg.GetBool("noChmod")
|
syncer.NoChmod = c.Cfg.GetBool("noChmod")
|
||||||
syncer.SrcFs = fs
|
syncer.SrcFs = fs
|
||||||
syncer.DestFs = c.Fs.Destination
|
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 {
|
if syncer.Delete {
|
||||||
c.Logger.INFO.Println("removing all files from destination that don't exist in static dirs")
|
c.Logger.INFO.Println("removing all files from destination that don't exist in static dirs")
|
||||||
|
|
|
@ -164,7 +164,6 @@ func loadDefaultSettingsFor(v *viper.Viper) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
v.SetDefault("cleanDestinationDir", false)
|
|
||||||
v.SetDefault("watch", false)
|
v.SetDefault("watch", false)
|
||||||
v.SetDefault("metaDataFormat", "toml")
|
v.SetDefault("metaDataFormat", "toml")
|
||||||
v.SetDefault("disable404", false)
|
v.SetDefault("disable404", false)
|
||||||
|
|
Loading…
Reference in a new issue