diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2018-08-17 14:41:22 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2018-08-17 14:41:22 +0300 |
commit | 104532b41534a3498711bcc0a210c81e3c4f6348 (patch) | |
tree | 1200c49ef5fa5bd26f66107e1d4b9d8ee57eb37d /_support | |
parent | 7b334395c9cd6a6257a5d93c00e365d326531bc0 (diff) |
Add vendor-gitaly-proto script
Diffstat (limited to '_support')
-rwxr-xr-x | _support/vendor-gitaly-proto | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/_support/vendor-gitaly-proto b/_support/vendor-gitaly-proto new file mode 100755 index 000000000..fc4c36f51 --- /dev/null +++ b/_support/vendor-gitaly-proto @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +require 'optparse' +require_relative 'run' + +PROGNAME = 'vendor-gitaly-proto' +USAGE = "Usage: #{PROGNAME} [--fork GITALY_PROTO_FORK_REPO] REVISION" +ORIGIN = 'gitlab.com/gitlab-org/gitaly-proto' + +def main(revision, repo:) + run!(%W[govendor fetch #{ORIGIN}/go::#{repo}/go@#{revision}]) +end + +options = ARGV.getopts(nil, 'fork:') +abort USAGE unless ARGV.count == 1 + +main(ARGV.first, repo: options['fork'] || ORIGIN) |