Makefile target to build a single plugin for local testing.
Often when developing a plugin it's only necessary to rebuild that plugin. Here we add a simple Makefile target that makes that easy: make plugin-dev PLUGIN=provider-aws Since it's only building one package and it's only building for the host architecture, this just uses "go install" directly, rather than using gox as we do when installing multiple packages, possibly for multiple architectures.
This commit is contained in:
parent
719e8c956e
commit
3af5552b54
|
@ -71,6 +71,7 @@ BUG FIXES:
|
|||
|
||||
INTERNAL IMPROVEMENTS:
|
||||
|
||||
* core: Makefile target "plugin-dev" for building just one plugin. [GH-3229]
|
||||
* helper/schema: Don't allow ``Update`` func if no attributes can actually be updated, per schema. [GH-3288]
|
||||
* helper/schema: Default hashing function for sets [GH-3018]
|
||||
* helper/multierror: Remove in favor of [github.com/hashicorp/go-multierror](http://github.com/hashicorp/go-multierror). [GH-3336]
|
||||
|
|
6
Makefile
6
Makefile
|
@ -15,6 +15,12 @@ dev: generate
|
|||
quickdev: generate
|
||||
@TF_QUICKDEV=1 TF_DEV=1 sh -c "'$(CURDIR)/scripts/build.sh'"
|
||||
|
||||
# Shorthand for building and installing just one plugin for local testing.
|
||||
# Run as (for example): make plugin-dev PLUGIN=provider-aws
|
||||
plugin-dev: generate
|
||||
go install github.com/hashicorp/terraform/builtin/bins/$(PLUGIN)
|
||||
mv $(GOPATH)/bin/$(PLUGIN) $(GOPATH)/bin/terraform-$(PLUGIN)
|
||||
|
||||
release: updatedeps
|
||||
gox -build-toolchain
|
||||
@$(MAKE) bin
|
||||
|
|
Loading…
Reference in New Issue