Created
October 8, 2014 17:54
-
-
Save derekwaynecarr/0cbeba5b08e12619cf92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use go get to get the specified dependency | |
dependency=$1 | |
echo "Getting new dependency ${dependency}" | |
if ! go get "${dependency}" ; then | |
echo "ERROR: Unable to get new dependency via 'go get'" | |
exit 1 | |
fi | |
# Use godep to save new dependency | |
echo "Saving dependencies ..." | |
godep restore | |
if ! godep save ./... ; then | |
echo "ERROR: Unable to save new dependencies. If packages are listed as not found, try fetching them via 'go get'" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment