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

Protect me from cleaning up. #6

Open
tddewey opened this issue Jul 27, 2014 · 2 comments
Open

Protect me from cleaning up. #6

tddewey opened this issue Jul 27, 2014 · 2 comments

Comments

@tddewey
Copy link
Collaborator

tddewey commented Jul 27, 2014

It's possible to delete everything. let's be a bit more careful both in generating and in cleanup. Proposed:

  • Only allow the generator to run if the current directory is empty (except for an allowed vvv.json and any file ending in .sql or .sql.gz). This prevents us from running the generator in, for example, www.
  • When cleaning up, explicitly target the files that yo created. So if, somehow, it's generated in the wrong folder — or we add new stuff to the generated folder — we only clean up the mess we made.
@lkwdwrd
Copy link
Owner

lkwdwrd commented Aug 24, 2014

Still considering this one... we could go the easy route and call out each of the generated files, but I've had a couple of situations pop up. I downloaded an entire install for testing and stuffed it into htdocs and used bootstrap to finish putting together the rest of the install pieces. It would be nice to have a way to identify pieces of the install to clean even if they would normally be part of the default install. Perhaps this is enough of an edge case to leave it be and have people manually back up files rather than provide a way to save them automatically.

@EHLOVader
Copy link
Contributor

I would really like this also to protect if the repos pulled in haven't been pushed. This would save some trouble in case you haven't sent your changes to the remotes.

An example of how to possible check for this would be below:

git fetch origin
git branch -r --contains HEAD

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

No branches or pull requests

3 participants