2018-04-28 22:05:30 +02:00
|
|
|
PROJECT_NAME := Pulumi SDK
|
2019-10-26 01:59:50 +02:00
|
|
|
SUB_PROJECTS := sdk/dotnet sdk/nodejs sdk/python sdk/go
|
2017-11-12 01:20:56 +01:00
|
|
|
include build/common.mk
|
2017-06-21 23:23:48 +02:00
|
|
|
|
2017-12-05 22:39:13 +01:00
|
|
|
PROJECT := github.com/pulumi/pulumi
|
|
|
|
PROJECT_PKGS := $(shell go list ./cmd/... ./pkg/... | grep -v /vendor/)
|
2019-09-23 19:10:11 +02:00
|
|
|
EXTRA_TEST_PKGS := $(shell go list ./examples/ ./tests/... | grep -v tests/templates | grep -v /vendor/)
|
2019-10-30 04:14:49 +01:00
|
|
|
VERSION := $(shell scripts/get-version HEAD)
|
2016-11-15 20:30:34 +01:00
|
|
|
|
2017-11-12 01:20:56 +01:00
|
|
|
TESTPARALLELISM := 10
|
2018-01-24 00:56:58 +01:00
|
|
|
|
2018-07-12 22:29:35 +02:00
|
|
|
build-proto::
|
|
|
|
cd sdk/proto && ./generate.sh
|
|
|
|
|
2020-03-09 18:35:20 +01:00
|
|
|
.PHONY: generate
|
|
|
|
generate::
|
|
|
|
$(call STEP_MESSAGE)
|
|
|
|
echo "Generate static assets bundle for docs generator"
|
|
|
|
go generate ./pkg/codegen/docs/
|
|
|
|
|
2017-11-12 01:20:56 +01:00
|
|
|
build::
|
2017-12-01 22:50:32 +01:00
|
|
|
go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
|
2017-01-28 00:42:55 +01:00
|
|
|
|
2017-11-12 01:20:56 +01:00
|
|
|
install::
|
2017-12-01 22:50:32 +01:00
|
|
|
GOBIN=$(PULUMI_BIN) go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
|
2017-10-05 23:08:35 +02:00
|
|
|
|
2018-08-08 22:00:42 +02:00
|
|
|
dist::
|
|
|
|
go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
|
|
|
|
|
2017-11-12 01:20:56 +01:00
|
|
|
lint::
|
2020-03-18 21:51:25 +01:00
|
|
|
for DIR in "cmd" "examples" "pkg" "sdk" "tests" ; do \
|
|
|
|
pushd $$DIR && golangci-lint run -c ../.golangci.yml --deadline 5m && popd ; \
|
|
|
|
done
|
2017-01-28 00:42:55 +01:00
|
|
|
|
2017-11-12 01:20:56 +01:00
|
|
|
test_fast::
|
2019-02-26 22:39:33 +01:00
|
|
|
$(GO_TEST_FAST) ${PROJECT_PKGS}
|
2017-08-06 17:52:32 +02:00
|
|
|
|
2017-11-12 01:20:56 +01:00
|
|
|
test_all::
|
2019-08-06 20:50:17 +02:00
|
|
|
$(GO_TEST) ${PROJECT_PKGS}
|
|
|
|
$(GO_TEST) -v -p=1 ${EXTRA_TEST_PKGS}
|
Makeify more; add a "full build" target (#193)
* Makeify more; add a "full build" target
This change uses make for more of our tree. Namely, the AWS provider
and LumiJS compilers each now use make to build and/or install them.
Not only does this bring about some consistency to how we build and
test things, but also made it easy to add a full build target:
$ make all
This target will build, test, and install the core Go tools, the LumiJS
compiler, and the AWS provider, in that order.
Each can be made in isolation, however, which ensures that the inner
loop for those is fast and so that, when it comes to finishing
pulumi/lumi#147, we can easily split them out and make from the top.
2017-06-02 23:26:34 +02:00
|
|
|
|
2018-03-06 23:36:50 +01:00
|
|
|
.PHONY: publish_tgz
|
|
|
|
publish_tgz:
|
2017-11-12 01:20:56 +01:00
|
|
|
$(call STEP_MESSAGE)
|
2018-03-06 23:36:50 +01:00
|
|
|
./scripts/publish_tgz.sh
|
|
|
|
|
|
|
|
.PHONY: publish_packages
|
|
|
|
publish_packages:
|
|
|
|
$(call STEP_MESSAGE)
|
|
|
|
./scripts/publish_packages.sh
|
2016-11-15 20:30:34 +01:00
|
|
|
|
2017-11-12 01:20:56 +01:00
|
|
|
.PHONY: coverage
|
|
|
|
coverage:
|
|
|
|
$(call STEP_MESSAGE)
|
2017-11-20 20:12:04 +01:00
|
|
|
./scripts/gocover.sh
|
2017-06-24 00:11:20 +02:00
|
|
|
|
2017-09-28 20:53:08 +02:00
|
|
|
# The travis_* targets are entrypoints for CI.
|
2017-11-12 01:20:56 +01:00
|
|
|
.PHONY: travis_cron travis_push travis_pull_request travis_api
|
2020-01-30 14:33:02 +01:00
|
|
|
travis_cron: all coverage
|
2018-03-06 23:36:50 +01:00
|
|
|
travis_push: only_build publish_tgz only_test publish_packages
|
2017-09-28 20:53:08 +02:00
|
|
|
travis_pull_request: all
|
|
|
|
travis_api: all
|