Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2207 from 2opremio/get-dependencies-faster
Browse files Browse the repository at this point in the history
Optimize make dependecy obtention
  • Loading branch information
2opremio authored and squaremo committed Jul 10, 2019
1 parent d6f7fd0 commit 779051f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ GOBIN?=$(shell echo `go env GOPATH`/bin)
# if you're testing out the Makefile with `-W` (pretend a file is
# new); use the full path to the pretend-new file, e.g.,
# `make -W $PWD/registry/registry.go`
godeps=$(shell go list -f '{{join .Deps "\n"}}' $1 | grep -v /vendor/ | xargs go list -f '{{if not .Standard}}{{ $$dep := . }}{{range .GoFiles}}{{$$dep.Dir}}/{{.}} {{end}}{{end}}')
godeps=$(shell go list -deps -f '{{if not .Standard}}{{ $$dep := . }}{{range .GoFiles}}{{$$dep.Dir}}/{{.}} {{end}}{{end}}' $(1))

FLUXD_DEPS:=$(call godeps,./cmd/fluxd)
FLUXCTL_DEPS:=$(call godeps,./cmd/fluxctl)
HELM_OPERATOR_DEPS:=$(call godeps,./cmd/helm-operator)
FLUXD_DEPS:=$(call godeps,./cmd/fluxd/...)
FLUXCTL_DEPS:=$(call godeps,./cmd/fluxctl/...)
HELM_OPERATOR_DEPS:=$(call godeps,./cmd/helm-operator/...)

IMAGE_TAG:=$(shell ./docker/image-tag)
VCS_REF:=$(shell git rev-parse HEAD)
Expand Down Expand Up @@ -113,15 +113,12 @@ cache/%/helm-$(HELM_VERSION): docker/helm.version
mv cache/$*/helm $@

$(GOBIN)/fluxctl: $(FLUXCTL_DEPS)
$(GOBIN)/fluxctl: ./cmd/fluxctl/*.go
go install ./cmd/fluxctl

$(GOBIN)/fluxd: $(FLUXD_DEPS)
$(GOBIN)/fluxd: cmd/fluxd/*.go
go install ./cmd/fluxd

$(GOBIN)/helm-operator: $(HELM_OPERATOR_DEPS)
$(GOBIN)/help-operator: cmd/helm-operator/*.go
go install ./cmd/helm-operator

integration-test: all
Expand Down

0 comments on commit 779051f

Please sign in to comment.