Files
dokku/plugins/config/Makefile
Jose Diaz-Gonzalez e7fb6007d3 feat: build golang binaries with higher concurrency
This should allow us to shave off a few minutes of build time, both locally and on CI
2019-01-20 18:12:08 -05:00

29 lines
670 B
Makefile

include ../../common.mk
GO_ARGS ?= -a
SUBCOMMANDS = subcommands/export subcommands/get subcommands/set subcommands/unset subcommands/keys subcommands/bundle
build-in-docker: clean
docker run --rm \
-v $$PWD/../..:$(GO_REPO_ROOT) \
-w $(GO_REPO_ROOT)/plugins/config \
$(BUILD_IMAGE) \
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 build" || exit $$?
build: commands subcommands
commands: **/**/commands.go
go build $(GO_ARGS) -o commands src/commands/commands.go
subcommands: $(SUBCOMMANDS)
subcommands/%: src/subcommands/*/%.go
go build $(GO_ARGS) -o $@ $<
clean:
rm -rf commands subcommands
src-clean:
rm -rf .gitignore src triggers vendor Makefile *.go