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

Ignore "." dirs in hugo --cleanDestinationDir #3202

Closed
hippora opened this Issue Mar 20, 2017 · 9 comments

Comments

Projects
None yet
4 participants
@hippora
Copy link

hippora commented Mar 20, 2017

hi,when i execute hugo --cleanDestinationDir ,it clean the public directory,but also delete .git in public what i want sync to github.io.

so can this directive did not remove .git ? thankyou

@bep bep added the Enhancement label Mar 20, 2017

@bep bep changed the title hugo --cleanDestinationDir Ignore "." dirs in hugo --cleanDestinationDir Mar 20, 2017

@eamonnmcevoy

This comment has been minimized.

Copy link
Contributor

eamonnmcevoy commented Mar 20, 2017

@bep Hi, I'd like to contribute to the project, could I be assigned this issue? thanks

@eamonnmcevoy

This comment has been minimized.

Copy link
Contributor

eamonnmcevoy commented Mar 20, 2017

I'm going to extend mostafah/fsync to allow a filter function to configured to allow certain files to remain in the destination folder

@bep

This comment has been minimized.

Copy link
Member

bep commented Mar 20, 2017

What is mostafah/fsync?

@eamonnmcevoy

This comment has been minimized.

Copy link
Contributor

eamonnmcevoy commented Mar 20, 2017

It's one of the dependencies in the vendor folder, that's where the code is to clean the destination folder.
github.com/spf13/vendor/github.com/spf13/fsync which is a fork of mostafah/fsync

@vbmade2000

This comment has been minimized.

Copy link

vbmade2000 commented Mar 20, 2017

@bep I think we can close this issue.

@eamonnmcevoy

This comment has been minimized.

Copy link
Contributor

eamonnmcevoy commented Mar 20, 2017

The change I've made for fsync won't resolve this though, it's just allows a filter to be applied. I'll need to update Hugo once the fsync pull request is merged.

@bep

This comment has been minimized.

Copy link
Member

bep commented Mar 20, 2017

The fsync is merged ...

@eamonnmcevoy

This comment has been minimized.

Copy link
Contributor

eamonnmcevoy commented Mar 21, 2017

@bep
Should I change the default behaviour of cleanDestinationDir to ignore '.' folders?
I'm considering add a new option instead cleanDestinationDirKeepDotFolders?

What do you think?

@eamonnmcevoy

This comment has been minimized.

Copy link
Contributor

eamonnmcevoy commented Mar 23, 2017

I think this can be closed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment