Skip to content
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

Adds a clean option to the generate command. #263

Merged
merged 2 commits into from Nov 4, 2015

Conversation

davereid
Copy link
Contributor

I thought it would be good if there was an option to clear the output directory out first prior to generation.

@beryllium
Copy link
Member

Good idea!

👍

Does it need any safety checking on the docroot before it goes and deletes stuff, or can we be reasonably sure that it's not going to wipe out / or ~/? :)

@davereid
Copy link
Contributor Author

I also debated just having this as a separate command too.

Hrm, I'm not sure about sanity checking. I would assume that the sculpin.output_dir is checked elsewhere by this point, but I'm not sure.

@beryllium
Copy link
Member

I think it makes more sense as a parameter than a separate command. You can always just delete output_* by hand, but you'll often forget to do that on generate - if you've renamed any posts or pages or whatnot, this parameter can save you from the resulting cruft.

Also, it will help simplify people's publishing scripts.

@davedevelopment
Copy link
Contributor

👍 for a simple check on the output_dir, even if it's printing the dir to screen with a Y/N input prompt just to be sure

@davereid
Copy link
Contributor Author

davereid commented Aug 1, 2015

I'd need a way to bypass the input prompt for my deployment workflow, so I'm a little at a loss for what checking I should put in.

@davereid
Copy link
Contributor Author

davereid commented Aug 1, 2015

I guess maybe adding a new --force parameter that would bypass the input prompt?

@simensen
Copy link
Member

simensen commented Aug 1, 2015

👍 for prompt + a way to bypass. I think there is already a non-interactive flag built into symfony console? Maybe we can use that? I think that is just supposed to accept defaults if defaults are allowed, right?

@davereid
Copy link
Contributor Author

davereid commented Aug 1, 2015

Ah, I see it now, --no-interaction

@davereid
Copy link
Contributor Author

davereid commented Aug 1, 2015

Ok, will work on the prompt.

@davereid
Copy link
Contributor Author

davereid commented Aug 3, 2015

Ok I think this is ready again for review, with the added question for confirmation if the --no-interaction flag is not used. I tested this myself with a manually built sculpin.phar.

@davedevelopment
Copy link
Contributor

👍 from me, works all good.

@davereid
Copy link
Contributor Author

davereid commented Nov 4, 2015

Is there anything I can do to help this along? Anything missing? Does it need tests?

davedevelopment added a commit that referenced this pull request Nov 4, 2015
Adds a clean option to the generate command.
@davedevelopment davedevelopment merged commit c4f0814 into sculpin:master Nov 4, 2015
@davedevelopment
Copy link
Contributor

@davereid nope, people have had enough time to object now, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants