scripts/updatedep: work around 'testify/assert'

'glide vc --no-tests' flag removes 'testify/assert' deps
in v2 client. Until we deprecate v2 tests, just copy the
necessary files as workaround.

And remove '--skip-tests' flags in case we add dependencies
in test files.
This commit is contained in:
Gyu-Ho Lee 2016-11-08 12:51:53 -08:00
parent ab6b175a2a
commit 4cf5b76d18

View File

@ -27,7 +27,7 @@ echo "manually deleting etcd-repo symlink in vendor"
rm -f vendor/github.com/coreos/etcd
GLIDE_ROOT="$GOPATH/src/github.com/Masterminds/glide"
GLIDE_SHA=cfde1caa6b394a320fc65c5abc77646d18febff9
GLIDE_SHA=21ff6d397ccca910873d8eaabab6a941c364cc70
go get -d -u github.com/Masterminds/glide
pushd "${GLIDE_ROOT}"
git reset --hard ${GLIDE_SHA}
@ -44,15 +44,24 @@ popd
if [ -n "$1" ]; then
echo "glide get on $(echo $1)"
glide get --strip-vendor --skip-test $1
glide get --strip-vendor $1
else
echo "glide update on *"
glide update --strip-vendor --skip-test
glide update --strip-vendor
fi;
# TODO: workaround to keep 'github.com/stretchr/testify/assert' in v2 tests
# TODO: remove this after dropping v2
echo "copying github.com/stretchr/testify/assert"
cp -rf vendor/github.com/stretchr/testify/assert ./temp-assert
echo "removing test files"
glide vc --only-code --no-tests
# TODO: remove this after dropping v2
mkdir -p vendor/github.com/stretchr/testify
mv ./temp-assert vendor/github.com/stretchr/testify/assert
mv vendor cmd/
echo "recreating symlink to etcd"