vendor: add script

Change-Id: Id4ebb34cf4f2b70c987af60b4b09bb2470f56ad5
Reviewed-by: Rob Pike <>
diff --git a/ b/
new file mode 100755
index 0000000..9b85297
--- /dev/null
+++ b/
@@ -0,0 +1,21 @@
+#!/bin/bash -e
+# updates the vendored copy of the repository and
+# stages the result, ready for "git commit".
+# The dep command can be obtained with "go get".
+# Update the package.
+dep ensure -update
+# Remove any vendored packages we don't use.
+dep prune
+# Delete test files.
+find vendor -name '*_test.go' -delete
+# Delete Google Cloud JSON API schemas.
+find vendor -name '*-api.json' -delete
+# Delete the cacheserver sources, which appear in the vendor directory because
+# we depend on cacheutil (a bug or deficiency in dep).
+find vendor/ -type f -depth 1 -delete
+git add vendor Gopkg.lock
+git gofmt