Skip to content

Instantly share code, notes, and snippets.

@polds
Created June 29, 2016 16:15
Show Gist options
  • Save polds/4258d2007f788c0f420084312518fe42 to your computer and use it in GitHub Desktop.
Save polds/4258d2007f788c0f420084312518fe42 to your computer and use it in GitHub Desktop.
Simple manageable Go Vendoring
#!/bin/sh
set -e
vendor_github() {
pushd .
mkdir -p ./ecs-cli/vendor/src/github.com/$1/$2
cd ./ecs-cli/vendor/src/github.com/$1
git clone https://github.com/$1/$2
cd $2
git checkout "$3"
rm -rf ./.git
popd
}
rm -rf ./ecs-cli/vendor
vendor_github aws aws-sdk-go 6876e9922ff299adf36e43e04c94820077968b3b
vendor_github jmespath go-jmespath 0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74
vendor_github Sirupsen logrus 418b41d23a1bf978c06faea5313ba194650ac088
vendor_github go-ini ini 12f418cc7edc5a618a51407b7ac1f1f512139df3
vendor_github codegangsta cli a65b733b303f0055f8d324d805f393cd3e7a7904
vendor_github kylelemons go-gypsy 42fc2c7ee9b8bd0ff636cd2d7a8c0a49491044c5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment