Added dist target for make, will help with Homebrew (#1731)

* Added dist target for make, will help with Homebrew

* Try to install go dependencies before building

* Make sure dep ensure is called before trying to build SDKs

* Removed dep ensure from dist initial step
This commit is contained in:
Thomas Schersach 2018-08-08 22:00:42 +02:00 committed by Matt Ellis
parent 5513f08669
commit 62463ab3bc
5 changed files with 18 additions and 0 deletions

View file

@ -28,6 +28,9 @@ build::
install::
GOBIN=$(PULUMI_BIN) go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
dist::
go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
LINT_SUPPRESS="or be unexported"
lint::
$(GOMETALINTER) main.go | grep -vE ${LINT_SUPPRESS} | sort ; exit $$(($${PIPESTATUS[1]}-1))

View file

@ -117,6 +117,7 @@ only_test:: $(SUB_PROJECTS:%=%_only_test)
default:: $(SUB_PROJECTS:%=%_default)
all:: $(SUB_PROJECTS:%=%_all)
ensure:: $(SUB_PROJECTS:%=%_ensure)
dist:: $(SUB_PROJECTS:%=%_dist)
endif
# `core` is like `default` except it does not build sub projects.
@ -157,6 +158,9 @@ install::
@mkdir -p $(PULUMI_BIN)
@mkdir -p $(PULUMI_NODE_MODULES)
dist::
$(call STEP_MESSAGE)
test_all:: test_fast
$(call STEP_MESSAGE)
@ -199,6 +203,8 @@ $(SUB_PROJECTS:%=%_only_build):
@$(MAKE) -C ./$(@:%_only_build=%) only_build
$(SUB_PROJECTS:%=%_only_test):
@$(MAKE) -C ./$(@:%_only_test=%) only_test
$(SUB_PROJECTS:%=%_dist):
@$(MAKE) -C ./$(@:%_dist=%) dist
endif
# As a convinece, we provide a format target that folks can build to

View file

@ -22,3 +22,6 @@ lint::
test_fast::
go test -cover -parallel ${TESTPARALLELISM} ${PROJECT_PKGS}
dist::
go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${LANGHOST_PKG}

View file

@ -41,3 +41,6 @@ test_fast::
istanbul report text-summary
istanbul report text
go test -timeout $(TEST_FAST_TIMEOUT) -cover -parallel ${TESTPARALLELISM} ${PROJECT_PKGS}
dist::
go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${LANGUAGE_HOST}

View file

@ -56,3 +56,6 @@ install::
test_fast::
pipenv run pip install ./env/src
pipenv run python -m unittest discover -s lib/test
dist::
go install -ldflags "-X github.com/pulumi/pulumi/sdk/python/pkg/version.Version=${VERSION}" ${LANGHOST_PKG}