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:
authorJacob Vosmaer <jacob@gitlab.com>2018-12-20 16:59:55 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2019-01-08 11:58:39 +0300
commit65f276088e155876c5cf067849f633884a2fce63 (patch)
tree898e9f187202be8985690b9a8444f0c03e26e3dd /_support
parentef39d24fd06a86b1bb5cd3ddf101d938a8e13763 (diff)
Fix 'make assemble' for gitlab-shell
Diffstat (limited to '_support')
-rw-r--r--_support/makegen.go41
1 files changed, 23 insertions, 18 deletions
diff --git a/_support/makegen.go b/_support/makegen.go
index 202357cc7..2a6a83380 100644
--- a/_support/makegen.go
+++ b/_support/makegen.go
@@ -69,13 +69,18 @@ func (gm *gitalyMake) BuildDir() string {
return gm.cwd
}
-func (gm *gitalyMake) Pkg() string { return "gitlab.com/gitlab-org/gitaly" }
-func (gm *gitalyMake) GoImports() string { return "bin/goimports" }
-func (gm *gitalyMake) GoCovMerge() string { return "bin/gocovmerge" }
-func (gm *gitalyMake) GoLint() string { return "bin/golint" }
-func (gm *gitalyMake) GoVendor() string { return "bin/govendor" }
-func (gm *gitalyMake) MegaCheck() string { return "bin/megacheck" }
-func (gm *gitalyMake) CoverageDir() string { return filepath.Join(gm.BuildDir(), "cover") }
+func (gm *gitalyMake) Pkg() string { return "gitlab.com/gitlab-org/gitaly" }
+func (gm *gitalyMake) GoImports() string { return "bin/goimports" }
+func (gm *gitalyMake) GoCovMerge() string { return "bin/gocovmerge" }
+func (gm *gitalyMake) GoLint() string { return "bin/golint" }
+func (gm *gitalyMake) GoVendor() string { return "bin/govendor" }
+func (gm *gitalyMake) MegaCheck() string { return "bin/megacheck" }
+func (gm *gitalyMake) CoverageDir() string { return filepath.Join(gm.BuildDir(), "cover") }
+func (gm *gitalyMake) GitalyRubyDir() string { return filepath.Join(gm.SourceDir(), "ruby") }
+func (gm *gitalyMake) GitlabShellRelDir() string { return "ruby/vendor/gitlab-shell" }
+func (gm *gitalyMake) GitlabShellDir() string {
+ return filepath.Join(gm.SourceDir(), gm.GitlabShellRelDir())
+}
// SourceDir is the location of gitaly's files, inside the _build GOPATH.
func (gm *gitalyMake) SourceDir() string { return filepath.Join(gm.BuildDir(), "src", gm.Pkg()) }
@@ -243,10 +248,10 @@ build: ../.ruby-bundle
# This file is used by Omnibus and CNG to skip the "bundle install"
# step. Both Omnibus and CNG assume it is in the Gitaly root, not in
# _build. Hence the '../' in front.
-../.ruby-bundle: {{ .SourceDir }}/ruby/Gemfile.lock {{ .SourceDir }}/ruby/Gemfile
- cd {{ .SourceDir }}/ruby && bundle config # for debugging
- cd {{ .SourceDir }}/ruby && bundle install $(BUNDLE_FLAGS)
- cd {{ .SourceDir }}/ruby && bundle show gitaly-proto # sanity check
+../.ruby-bundle: {{ .GitalyRubyDir }}/Gemfile.lock {{ .GitalyRubyDir }}/Gemfile
+ cd {{ .GitalyRubyDir }} && bundle config # for debugging
+ cd {{ .GitalyRubyDir }} && bundle install $(BUNDLE_FLAGS)
+ cd {{ .GitalyRubyDir }} && bundle show gitaly-proto # sanity check
touch $@
.PHONY: install
@@ -277,9 +282,9 @@ assemble-go: build
assemble-ruby:
rm -rf $(ASSEMBLY_ROOT)/ruby
mkdir -p $(ASSEMBLY_ROOT)
- rm -rf {{ .SourceDir }}/ruby/tmp
- cp -r {{ .SourceDir }}/ruby $(ASSEMBLY_ROOT)/ruby
- rm -rf $(ASSEMBLY_ROOT)/ruby/spec
+ rm -rf {{ .GitalyRubyDir }}/tmp {{ .GitlabShellDir }}/tmp
+ cp -r {{ .GitalyRubyDir }} $(ASSEMBLY_ROOT)/ruby
+ rm -rf $(ASSEMBLY_ROOT)/ruby/spec $(ASSEMBLY_ROOT)/{{ .GitlabShellRelDir }}/spec $(ASSEMBLY_ROOT)/{{ .GitlabShellRelDir }}/gitlab-shell.log
binaries: assemble
@if [ $$(uname -m) != 'x86_64' ]; then echo Incorrect architecture for build: $(uname -m); exit 1; fi
@@ -317,7 +322,7 @@ race-go: prepare-tests
.PHONY: rspec
rspec: assemble-go prepare-tests
- cd {{ .SourceDir }}/ruby && bundle exec rspec
+ cd {{ .GitalyRubyDir }} && bundle exec rspec
.PHONY: verify
verify: lint check-formatting megacheck govendor-status notice-up-to-date govendor-tagged rubocop
@@ -381,7 +386,7 @@ govendor-tagged: {{ .GoVendor }}
.PHONY: rubocop
rubocop: ../.ruby-bundle
- cd {{ .SourceDir }}/ruby && bundle exec rubocop --parallel
+ cd {{ .GitalyRubyDir }} && bundle exec rubocop --parallel
.PHONY: cover
cover: prepare-tests {{ .GoCovMerge }}
@@ -403,8 +408,8 @@ cover: prepare-tests {{ .GoCovMerge }}
docker:
rm -rf docker/
mkdir -p docker/bin/
- rm -rf {{ .SourceDir }}/ruby/tmp
- cp -r {{ .SourceDir }}/ruby docker/ruby
+ rm -rf {{ .GitalyRubyDir }}/tmp
+ cp -r {{ .GitalyRubyDir }} docker/ruby
rm -rf docker/ruby/vendor/bundle
{{ $pkg := .Pkg }}
{{ $goLdFlags := .GoLdFlags }}