Created
July 11, 2016 16:30
-
-
Save jeremyje/a9b9668bbde129285e5fa6a26c56bbbe to your computer and use it in GitHub Desktop.
Go vendoring shell script. Adds a proper git submodule for the dependency from head, does not do proper versioning because that's how I roll.
This file contains hidden or 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
| #!/bin/bash | |
| GO_DIR=$(pwd) | |
| echo ${GO_DIR} | |
| GitClone() { | |
| BASE_DIR=vendor/$1 | |
| REPO=$2 | |
| echo ${GO_DIR} | |
| cd ${GO_DIR} | |
| git submodule add ${REPO} ${BASE_DIR} | |
| cd ${GO_DIR} | |
| } | |
| GithubClone() { | |
| USER_PATH=$1 | |
| BASE_DIR=github.com/${USER_PATH} | |
| REPO=https://github.com/${USER_PATH}.git | |
| GitClone ${BASE_DIR} ${REPO} | |
| } | |
| BitbucketClone() { | |
| USER_PATH=$1 | |
| BASE_DIR=bitbucket.org/${USER_PATH} | |
| REPO=https://bitbucket.org/${USER_PATH}.git | |
| GitClone ${BASE_DIR} ${REPO} | |
| } | |
| GitClone golang.org/x/net https://go.googlesource.com/net | |
| GitClone gopkg.in/yaml.v2 https://github.com/go-yaml/yaml.git | |
| GithubClone stretchr/testify | |
| GithubClone beorn7/perks | |
| GithubClone golang/protobuf | |
| GithubClone matttproud/golang_protobuf_extensions | |
| GithubClone prometheus/client_golang | |
| GithubClone prometheus/client_model | |
| GithubClone prometheus/common | |
| GithubClone prometheus/procfs | |
| # | |
| #GitClone golang.org/x/text https://go.googlesource.com/text | |
| #GitClone golang.org/x/crypto https://go.googlesource.com/crypto | |
| #GithubClone Sirupsen/logrus | |
| #GitClone gopkg.in/gemnasium/logrus-airbrake-hook.v2 [email protected]:gemnasium/logrus-airbrake-hook.git | |
| #GitClone gopkg.in/airbrake/gobrake.v2 [email protected]:airbrake/gobrake.git | |
| #GithubClone julienschmidt/httprouter | |
| # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment