Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
scripts: make glide-update clean up unnecessary files for etcd,grpc
Browse files Browse the repository at this point in the history
As fleet needs only some parts of etcd, grpc, and gogo/protobuf,
glide-update.sh should clean up unnecessary directories to keep vendor
trees as small as possible.

Also remove --keep from glide-vc, as internal packages are already
correctly handled by glide.
  • Loading branch information
Dongsu Park committed Aug 25, 2016
1 parent 5a00de6 commit 1545b05
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions scripts/glide-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,29 @@ fi

glide update --strip-vcs --strip-vendor --update-vendored --delete
glide vc --only-code --no-tests --no-legal-files
# NOTE: we cannot remove vendor/golang.org/x/net/internal to avoid build errors
# that internal packages cannot be imported.
git checkout vendor/golang.org/x/net/internal

# manual cleanup to reduce size of vendor trees

ETCD_CLEANUP_DIRS="\
alarm auth clientv3 cmd compactor contrib discovery e2e embed etcdctl \
etcdmain etcdserver hack integration lease logos mvcc proxy raft rafthttp \
scripts snap store tools version wal \
"

pushd vendor/github.com/coreos/etcd
rm -rf $ETCD_CLEANUP_DIRS
popd

GRPC_CLEANUP_DIRS="benchmark examples test"

pushd vendor/google.golang.org/grpc
rm -rf $GRPC_CLEANUP_DIRS
popd

GOGOPROTOBUF_CLEANUP_DIRS="test vanity/test"

pushd vendor/github.com/gogo/protobuf
rm -rf $GOGOPROTOBUF_CLEANUP_DIRS
popd

rm -rf vendor/github.com/godbus/dbus/_examples

0 comments on commit 1545b05

Please sign in to comment.