diff --git a/Makefile b/Makefile index af1a761..ccbf6b1 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,10 @@ # These targets are not files -.PHONY: check test builder-image buildenv deploy-runtimes tools +.PHONY: check test compile builder-image buildenv deploy-runtimes tools STACK ?= heroku-18 STACKS ?= heroku-16 heroku-18 heroku-20 TEST_CMD ?= test/run-versions && test/run-features && test/run-deps +FIXTURE ?= test/fixtures/requirements-standard ENV_FILE ?= builds/dockerenv.default BUILDER_IMAGE_PREFIX := heroku-python-build @@ -21,6 +22,13 @@ test: @docker run --rm -it -v $(PWD):/buildpack:ro -e "STACK=$(STACK)" "$(STACK_IMAGE_TAG)" bash -c 'cp -r /buildpack /buildpack_test && cd /buildpack_test && $(TEST_CMD)' @echo +compile: + @echo "Running compile using: STACK=$(STACK) FIXTURE=$(FIXTURE)" + @echo + @docker run --rm -it -v $(PWD):/src:ro -e "STACK=$(STACK)" -w /buildpack "$(STACK_IMAGE_TAG)" \ + bash -c 'cp -r /src/{bin,vendor} /buildpack && cp -r /src/$(FIXTURE) /build && mkdir /cache /env && bin/compile /build /cache /env' + @echo + builder-image: @echo "Generating binary builder image for $(STACK)..." @echo