vendor: add script

Change-Id: I0013f5619f8d68b00249deeb1aadff23b0eefa06
Reviewed-by: Rob Pike <>
diff --git a/ b/
new file mode 100755
index 0000000..26794b4
--- /dev/null
+++ b/
@@ -0,0 +1,18 @@
+#!/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
+git add vendor Gopkg.lock
+git gofmt