cfg/bin/migrate-godeps-1.6
2016-07-21 16:29:54 +02:00

22 lines
414 B
Bash
Executable file

#!/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