gogetx is a patch of "go get" to support checking out repositories to specified branches or tags. (upgraded to go1.8.1)
go get -u -d h12.io/gogetx
go generate h12.io/gogetx
go build h12.io/gogetx
-
path: your_org/.*
tags:
- v1.2
- develop
- master
-
path: .*
tags:
- master
- For your_org/abc with tag
v1.2
defined, it will be checked out to tagv1.2
. - For your_org/def without tag v1.2 but with branch
develop
, it will be checked out to branchdevelop
. - For your_org/xyz without tag v1.2 or branch
develop
, it will be checked out tomaster
. - Any other repositories will be checked out to
master
.
Put gogetx-config.yml
under the current directory and run:
gogetx your_repo