Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ clean:
clean_pkg:
rm -rf ../../../../pkg Godeps/_workspace/pkg

# Remove everything including stuff pulled down by bootstrap.sh
cleanall:
# symlinks
for f in config data py-vtdb; do test -L ../../../../$$f && rm ../../../../$$f; done
# directories created by bootstrap.sh
# - exclude vtdataroot and vthook as they may have data we want
rm -rf ../../../../bin ../../../../dist ../../../../lib ../../../../pkg
# keep the vendor.json file but nothing else under the vendor directory as it's not actually part of the Vitess repo
rm -rf vendor/cloud.google.com vendor/github.com vendor/golang.org vendor/google.golang.org vendor/gopkg.in
# other stuff in the go hierarchy that is not under vendor/
rm -rf ../../../golang.org ../../../honnef.co
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't remove anything outside the vitess tree because the user may have other projects that depend on those downloads. Same for the line below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not removing anything that wasn't created by bootstrap.sh. If someone has added local changes I agree they'll lose them but isn't something like make cleanall intended to do what it says?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want me to be very explicit and check each and every package that's pulled down by bootstrap.sh then I can do that. It's not clear to me what you're trying to prevent or if you just want to be extremely cautious when running such a command.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was more worried about such external dependencies being used by other projects. But I guess such people can stay away from using cleanall.

rm -rf ../../../github.com/golang ../../../github.com/kardianos ../../../github.com/kisielk
# Remind people to run bootstrap.sh again
echo "Please run bootstrap.sh again to setup your environment"

unit_test: build
echo $$(date): Running unit tests
go test $(VT_GO_PARALLEL) ./go/...
Expand Down