diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2020-03-17 01:48:01 +0300 |
---|---|---|
committer | James Fargher <proglottis@gmail.com> | 2020-03-17 01:48:01 +0300 |
commit | ee4f03f5b8068500db1afbe5520afecfffa4e632 (patch) | |
tree | c0f2326afe8bfe79c3cb8e59f4285426ed50c268 | |
parent | 4bd9b1536b4776ae369b8e43388a25941e18a19e (diff) |
Speed up 'bundle install' in GDK
-rw-r--r-- | _support/Makefile.template | 2 | ||||
-rw-r--r-- | _support/makegen.go | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/_support/Makefile.template b/_support/Makefile.template index 4135e5bb2..60f334e0e 100644 --- a/_support/Makefile.template +++ b/_support/Makefile.template @@ -8,7 +8,7 @@ # These variables may be overridden at runtime by top-level make PREFIX ?= /usr/local INSTALL_DEST_DIR := $(DESTDIR)$(PREFIX)/bin/ -BUNDLE_FLAGS ?= --deployment +BUNDLE_FLAGS ?= {{ .BundleFlags }} ASSEMBLY_ROOT ?= {{ .BuildDir }}/assembly BUILD_TAGS := tracer_static tracer_static_jaeger diff --git a/_support/makegen.go b/_support/makegen.go index a8e9351ac..81a5ae611 100644 --- a/_support/makegen.go +++ b/_support/makegen.go @@ -334,6 +334,19 @@ func (gm *gitalyMake) GolangCILint() string { return fmt.Sprintf("golangci-lint-%s-%s-%s", gm.GolangCILintVersion(), runtime.GOOS, runtime.GOARCH) } +func (gm *gitalyMake) BundleFlags() string { + if gm.IsGDK() { + return "--no-deployment" + } + + return "--deployment" +} + +func (gm *gitalyMake) IsGDK() bool { + _, err := os.Stat(filepath.Join(gm.SourceDir(), "../.gdk-install-root")) + return err == nil +} + var templateText = func() string { contents, err := ioutil.ReadFile("../_support/Makefile.template") if err != nil { |