Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2018-08-17 14:41:22 +0300
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2018-08-17 14:41:22 +0300
commit5850f9102dae9ca8775025a18bd3ced046c51651 (patch)
tree1200c49ef5fa5bd26f66107e1d4b9d8ee57eb37d
parent7b334395c9cd6a6257a5d93c00e365d326531bc0 (diff)
parent104532b41534a3498711bcc0a210c81e3c4f6348 (diff)
Merge branch 'vendor-gitaly-proto' into 'master'
Add vendor-gitaly-proto script See merge request gitlab-org/gitaly!863
-rw-r--r--CONTRIBUTING.md6
-rwxr-xr-x_support/vendor-gitaly-proto16
-rw-r--r--doc/beginners_guide.md2
3 files changed, 20 insertions, 4 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d6f5fb985..ade517e4a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -257,13 +257,13 @@ The following steps take place inside your Gitaly repo.
```shell
# for forks:
-govendor fetch gitlab.com/gitlab-org/gitaly-proto/go::gitlab.com/my-user/gitaly-proto/go@my-branch
+_support/vendor-gitaly-proto --fork gitlab.com/my-user/gitaly-proto my-branch
# for a gitlab-org branch:
-govendor fetch gitlab.com/gitlab-org/gitaly-proto/go@my-branch
+_support/vendor-gitaly-proto my-branch
# if the gitaly-proto version you want to use was already released:
-govendor fetch gitlab.com/gitlab-org/gitaly-proto/go@v<tag-version>
+_support/vendor-gitaly-proto v<tag-version>
```
- Include the new proto Go code in your next commit with `git add vendor`
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)
diff --git a/doc/beginners_guide.md b/doc/beginners_guide.md
index 8ca7aa446..dc8fcc390 100644
--- a/doc/beginners_guide.md
+++ b/doc/beginners_guide.md
@@ -108,7 +108,7 @@ The Gitaly Proto changes need to be updated in Gitaly itself before the server
can be edited.
```bash
-$ govendor fetch gitlab.com/gitlab-org/gitaly-proto/go^::gitlab.com/<your-username>/gitaly-proto/go@<your-feature-branch>
+$ _support/vendor-gitaly-proto --fork gitlab.com/my-user/gitaly-proto my-branch
# change the versions in Gemfile for gitaly-proto
# cd ruby