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, go-systemd, 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 bf039f0 commit fa2a50c
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions scripts/glide-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,37 @@ 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
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

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

# go-systemd
GOSYSTEMD_CLEANUP_DIRS="examples journal login1 machine1 sdjournal util"
pushd vendor/github.com/coreos/go-systemd
rm -rf $GOSYSTEMD_CLEANUP_DIRS
popd

# grpc
GRPC_CLEANUP_DIRS="benchmark examples test"
pushd vendor/google.golang.org/grpc
rm -rf $GRPC_CLEANUP_DIRS
popd

# gogo/protobuf
GOGOPROTOBUF_CLEANUP_DIRS="test vanity/test"
pushd vendor/github.com/gogo/protobuf
rm -rf $GOGOPROTOBUF_CLEANUP_DIRS
popd

0 comments on commit fa2a50c

Please sign in to comment.