diff options
Diffstat (limited to '_support/vendor-gitaly-proto')
-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) |