cfg/bin/migrate-godeps-1.6

23 lines
414 B
Groff
Raw Normal View History

2016-07-21 13:48:49 +00:00
#!/bin/bash
PWD=$(pwd)
if ! [ -e "${PWD}/Godeps/_workspace/src" ]; then
echo "Path ${PWD}/Godeps/_workspace/src not found, stopping."
exit 1
fi
if [ -e "${PWD}/vendor" ]; then
echo "You already have a vendor directory, stopping."
exit 1
fi
set -ex
mv "${PWD}/Godeps/_workspace/src" "${PWD}/vendor"
rm -rf "${PWD}/Godeps/_workspace"
godep update -goversion
git add vendor
git rm -rf Godeps/_workspace