2017-06-22 23:57:09 +02:00
|
|
|
SHELL=/bin/bash
|
2017-08-24 01:51:16 +02:00
|
|
|
.SHELLFLAGS=-ec
|
2017-06-21 23:23:48 +02:00
|
|
|
|
2017-08-02 18:25:22 +02:00
|
|
|
PROJECT=github.com/pulumi/pulumi-fabric
|
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
|
|
|
PROJECT_PKGS=$(shell go list ./cmd/... ./pkg/... | grep -v /vendor/)
|
2017-06-16 02:42:53 +02:00
|
|
|
TESTPARALLELISM=10
|
2016-11-15 20:30:34 +01:00
|
|
|
|
2017-06-22 23:57:09 +02:00
|
|
|
ECHO=echo -e
|
2017-06-21 23:46:03 +02:00
|
|
|
GOMETALINTERBIN=gometalinter
|
Tidy up more lint
This change fixes a few things:
* Most importantly, we need to place a leading "." in the paths
to Gometalinter, otherwise some sub-linters just silently skip
the directory altogether. errcheck is one such linter, which
is a very important one!
* Use an explicit Gometalinter.json file to configure the various
settings. This flips on a few additional linters that aren't
on by default (line line length checking). Sadly, a few that
I'd like to enable take waaaay too much time, so in the future
we may consider a nightly job (this includes code similarity,
unused parameters, unused functions, and others that generally
require global analysis).
* Now that we're running more, however, linting takes a while!
The core Lumi project now takes 26 seconds to lint on my laptop.
That's not terrible, but it's long enough that we don't want to
do the silly "run them twice" thing our Makefiles were previously
doing. Instead, we shall deploy some $$($${PIPESTATUS[1]}-1))-fu
to rely on the fact that grep returns 1 on "zero lines".
* Finally, fix the many issues that this turned up.
I think(?) we are done, except, of course, for needing to drive
down some of the cyclomatic complexity issues (which I'm possibly
going to punt on; see pulumi/lumi#259 for more details).
2017-06-22 21:09:46 +02:00
|
|
|
GOMETALINTER=${GOMETALINTERBIN} --config=Gometalinter.json
|
2017-06-21 23:46:03 +02:00
|
|
|
|
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
|
|
|
.PHONY: default
|
2017-08-30 03:24:12 +02:00
|
|
|
all: banner_all core sdk/nodejs integrationtest
|
2017-06-16 18:50:56 +02:00
|
|
|
|
|
|
|
.PHONY: nightly
|
2017-08-06 17:52:32 +02:00
|
|
|
nightly: default gocover
|
|
|
|
|
|
|
|
.PHONY: core
|
|
|
|
core: vet test install lint_quiet
|
2017-05-24 20:58:58 +02:00
|
|
|
|
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
|
|
|
.PHONY: banner
|
2017-05-24 20:58:58 +02:00
|
|
|
banner:
|
2017-08-02 18:25:22 +02:00
|
|
|
@$(ECHO) "\033[1;37m=====================\033[0m"
|
|
|
|
@$(ECHO) "\033[1;37mPulumi Fabric (Quick)\033[0m"
|
|
|
|
@$(ECHO) "\033[1;37m=====================\033[0m"
|
2017-06-22 23:57:09 +02:00
|
|
|
@$(ECHO) "\033[0;33mRunning quick build; to run full tests, run 'make all'\033[0m"
|
|
|
|
@$(ECHO) "\033[0;33mRemember to do this before checkin, otherwise your CI will fail\033[0m"
|
2017-06-02 19:30:57 +02:00
|
|
|
|
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
|
|
|
.PHONY: banner_all
|
|
|
|
banner_all:
|
2017-08-02 18:25:22 +02:00
|
|
|
@$(ECHO) "\033[1;37m====================\033[0m"
|
|
|
|
@$(ECHO) "\033[1;37mPulumi Fabric (Full)\033[0m"
|
|
|
|
@$(ECHO) "\033[1;37m====================\033[0m"
|
2017-01-28 00:42:55 +01:00
|
|
|
|
2017-09-03 19:58:33 +02:00
|
|
|
.PHONY: configure
|
|
|
|
configure:
|
|
|
|
dep ensure -v
|
|
|
|
cd sdk/nodejs && yarn install
|
|
|
|
cd sdk/nodejs/runtime/native && ./ensure_node_v8.sh
|
2017-09-04 19:06:29 +02:00
|
|
|
cd sdk/nodejs/runtime/native && ../../node_modules/.bin/node-gyp configure
|
2017-09-03 19:58:33 +02:00
|
|
|
|
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
|
|
|
.PHONY: install
|
2017-01-28 00:42:55 +01:00
|
|
|
install:
|
2017-06-22 23:57:09 +02:00
|
|
|
@$(ECHO) "\033[0;32mINSTALL:\033[0m"
|
2017-06-21 22:24:35 +02:00
|
|
|
go install ${PROJECT}/cmd/lumi
|
|
|
|
go install ${PROJECT}/cmd/lumidl
|
2017-01-28 00:42:55 +01:00
|
|
|
|
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
|
|
|
.PHONY: lint
|
2017-01-28 00:42:55 +01:00
|
|
|
lint:
|
2017-06-22 23:57:09 +02:00
|
|
|
@$(ECHO) "\033[0;32mLINT:\033[0m"
|
Tidy up more lint
This change fixes a few things:
* Most importantly, we need to place a leading "." in the paths
to Gometalinter, otherwise some sub-linters just silently skip
the directory altogether. errcheck is one such linter, which
is a very important one!
* Use an explicit Gometalinter.json file to configure the various
settings. This flips on a few additional linters that aren't
on by default (line line length checking). Sadly, a few that
I'd like to enable take waaaay too much time, so in the future
we may consider a nightly job (this includes code similarity,
unused parameters, unused functions, and others that generally
require global analysis).
* Now that we're running more, however, linting takes a while!
The core Lumi project now takes 26 seconds to lint on my laptop.
That's not terrible, but it's long enough that we don't want to
do the silly "run them twice" thing our Makefiles were previously
doing. Instead, we shall deploy some $$($${PIPESTATUS[1]}-1))-fu
to rely on the fact that grep returns 1 on "zero lines".
* Finally, fix the many issues that this turned up.
I think(?) we are done, except, of course, for needing to drive
down some of the cyclomatic complexity issues (which I'm possibly
going to punt on; see pulumi/lumi#259 for more details).
2017-06-22 21:09:46 +02:00
|
|
|
$(GOMETALINTER) ./pkg/... | sort ; exit "$${PIPESTATUS[0]}"
|
|
|
|
$(GOMETALINTER) ./cmd/lumi/... | sort ; exit "$${PIPESTATUS[0]}"
|
|
|
|
$(GOMETALINTER) ./cmd/lumidl/... | sort ; exit "$${PIPESTATUS[0]}"
|
2017-06-21 22:24:35 +02:00
|
|
|
|
|
|
|
# In quiet mode, suppress some messages.
|
2017-08-02 18:25:22 +02:00
|
|
|
# - "or be unexported": TODO[pulumi/pulumi-fabric#191]: will fix when we write all of our API docs
|
2017-06-21 22:24:35 +02:00
|
|
|
# - "Subprocess launching with variable": we intentionally launch processes dynamically.
|
2017-08-02 18:25:22 +02:00
|
|
|
# - "cyclomatic complexity" (disabled in config): TODO[pulumi/pulumi-fabric#259]: need to fix many of these.
|
Tidy up more lint
This change fixes a few things:
* Most importantly, we need to place a leading "." in the paths
to Gometalinter, otherwise some sub-linters just silently skip
the directory altogether. errcheck is one such linter, which
is a very important one!
* Use an explicit Gometalinter.json file to configure the various
settings. This flips on a few additional linters that aren't
on by default (line line length checking). Sadly, a few that
I'd like to enable take waaaay too much time, so in the future
we may consider a nightly job (this includes code similarity,
unused parameters, unused functions, and others that generally
require global analysis).
* Now that we're running more, however, linting takes a while!
The core Lumi project now takes 26 seconds to lint on my laptop.
That's not terrible, but it's long enough that we don't want to
do the silly "run them twice" thing our Makefiles were previously
doing. Instead, we shall deploy some $$($${PIPESTATUS[1]}-1))-fu
to rely on the fact that grep returns 1 on "zero lines".
* Finally, fix the many issues that this turned up.
I think(?) we are done, except, of course, for needing to drive
down some of the cyclomatic complexity issues (which I'm possibly
going to punt on; see pulumi/lumi#259 for more details).
2017-06-22 21:09:46 +02:00
|
|
|
LINT_SUPPRESS="or be unexported|Subprocess launching with variable"
|
2017-06-14 01:47:55 +02:00
|
|
|
|
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
|
|
|
.PHONY: lint_quiet
|
2017-04-12 20:01:16 +02:00
|
|
|
lint_quiet:
|
2017-06-22 23:57:09 +02:00
|
|
|
@$(ECHO) "\033[0;32mLINT (quiet):\033[0m"
|
Tidy up more lint
This change fixes a few things:
* Most importantly, we need to place a leading "." in the paths
to Gometalinter, otherwise some sub-linters just silently skip
the directory altogether. errcheck is one such linter, which
is a very important one!
* Use an explicit Gometalinter.json file to configure the various
settings. This flips on a few additional linters that aren't
on by default (line line length checking). Sadly, a few that
I'd like to enable take waaaay too much time, so in the future
we may consider a nightly job (this includes code similarity,
unused parameters, unused functions, and others that generally
require global analysis).
* Now that we're running more, however, linting takes a while!
The core Lumi project now takes 26 seconds to lint on my laptop.
That's not terrible, but it's long enough that we don't want to
do the silly "run them twice" thing our Makefiles were previously
doing. Instead, we shall deploy some $$($${PIPESTATUS[1]}-1))-fu
to rely on the fact that grep returns 1 on "zero lines".
* Finally, fix the many issues that this turned up.
I think(?) we are done, except, of course, for needing to drive
down some of the cyclomatic complexity issues (which I'm possibly
going to punt on; see pulumi/lumi#259 for more details).
2017-06-22 21:09:46 +02:00
|
|
|
$(GOMETALINTER) ./pkg/... | grep -vE ${LINT_SUPPRESS} | sort ; exit $$(($${PIPESTATUS[1]}-1))
|
|
|
|
$(GOMETALINTER) ./cmd/lumi/... | grep -vE ${LINT_SUPPRESS} | sort ; exit $$(($${PIPESTATUS[1]}-1))
|
|
|
|
$(GOMETALINTER) ./cmd/lumidl/... | grep -vE ${LINT_SUPPRESS} | sort ; exit $$(($${PIPESTATUS[1]}-1))
|
2017-06-22 23:57:09 +02:00
|
|
|
@$(ECHO) "\033[0;33mlint was run quietly; to run with noisy errors, run 'make lint'\033[0m"
|
2017-01-28 00:42:55 +01:00
|
|
|
|
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
|
|
|
.PHONY: vet
|
|
|
|
vet:
|
2017-06-22 23:57:09 +02:00
|
|
|
@$(ECHO) "\033[0;32mVET:\033[0m"
|
2017-06-21 22:24:35 +02:00
|
|
|
go tool vet -printf=false cmd/ pkg/
|
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
|
|
|
|
|
|
|
.PHONY: test
|
2017-01-28 00:42:55 +01:00
|
|
|
test:
|
2017-06-22 23:57:09 +02:00
|
|
|
@$(ECHO) "\033[0;32mTEST:\033[0m"
|
2017-08-06 17:52:32 +02:00
|
|
|
go test -cover -parallel ${TESTPARALLELISM} ${PROJECT_PKGS}
|
|
|
|
|
|
|
|
.PHONY: integrationtest
|
|
|
|
integrationtest:
|
|
|
|
@$(ECHO) "\033[0;32mINTEGRATION TEST:\033[0m"
|
|
|
|
go test -cover -parallel ${TESTPARALLELISM} ./examples
|
2017-06-01 23:01:26 +02:00
|
|
|
|
2017-08-28 18:17:52 +02:00
|
|
|
sdk/nodejs:
|
|
|
|
@cd ./sdk/nodejs && $(MAKE)
|
|
|
|
.PHONY: sdk/nodejs
|
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
|
|
|
|
2017-07-20 20:06:24 +02:00
|
|
|
publish:
|
2017-07-21 18:37:14 +02:00
|
|
|
@$(ECHO) "\033[0;32mPublishing current release:\033[0m"
|
|
|
|
./scripts/publish.sh
|
2017-07-20 20:06:24 +02:00
|
|
|
.PHONY: publish
|
2016-11-15 20:30:34 +01:00
|
|
|
|
2017-06-24 00:11:20 +02:00
|
|
|
.PHONY: gocover
|
|
|
|
gocover:
|
|
|
|
@$(ECHO) "\033[0;32mGO CODE COVERAGE:\033[0m"
|
2017-07-21 18:37:14 +02:00
|
|
|
./scripts/gocover.sh
|
2017-06-24 00:11:20 +02:00
|
|
|
|