feat: add ability to specify a plugin build target

This speeds up development as it allows us to compile the exact binary needed as opposed to the entire plugin.
This commit is contained in:
Jose Diaz-Gonzalez
2020-11-17 23:49:06 -05:00
parent e8d0965a33
commit b4552237b6

View File

@@ -1,4 +1,5 @@
GO_ARGS ?= -a
GO_PLUGIN_MAKE_TARGET ?= build
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
BUILD_IMAGE := golang:1.14.4
@@ -15,7 +16,7 @@ build-in-docker: clean
-e GO111MODULE=on \
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
$(BUILD_IMAGE) \
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 build" || exit $$?
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
clean:
rm -rf commands subcommands triggers prop