New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy only the static files changed #1671
Conversation
… the flag forceCopyStatic to always copy all static files when a file is changed
Thank you for your contribution, @ffrizzo! But before we continue, could you please read the Code Contribution Guideline and make the appropriate changes? (e.g. the git commit message). Many thanks! |
Update on the watcher copy static to copy only the changed files and add an flag forceSyncStatic to copy all statics always a static is changed See gohugoio#1644 gohugoio#1559
@@ -171,7 +172,7 @@ func initCoreCommonFlags(cmd *cobra.Command) { | |||
cmd.Flags().BoolVar(&nitro.AnalysisOn, "stepAnalysis", false, "display memory and timing of different steps of the program") | |||
cmd.Flags().BoolVar(&PluralizeListTitles, "pluralizeListTitles", true, "Pluralize titles in lists using inflect") | |||
cmd.Flags().BoolVar(&PreserveTaxonomyNames, "preserveTaxonomyNames", false, `Preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu")`) | |||
|
|||
cmd.Flags().BoolVarP(&ForceSync, "forceSyncStatic", "", true, "Copy all files when static is changed.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be default false
Update on the watcher copy static to copy only the changed files and add an flag forceSyncStatic to copy all statics always a static is changed See gohugoio#1644 gohugoio#1559
syncer.SrcFs = hugofs.SourceFs | ||
syncer.DestFs = hugofs.DestinationFS | ||
|
||
publishDir := helpers.AbsPathify(viper.GetString("PublishDir")) + "/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os file separator
Update on the watcher copy static to copy only the changed files and add an flag forceSyncStatic to copy all statics always a static is changed See gohugoio#1644 gohugoio#1559
@bep This now looks good to me. Are you okay with me merging? |
Sure. |
Merged as a291f3c |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Update on the watcher copy static to copy only the changed files and add an flag forceSyncStatic to copy all statics always a static is changed
#1644 #1559