forked from mojodna/heroku-buildpack-jemalloc
-
Notifications
You must be signed in to change notification settings - Fork 78
/
Makefile
26 lines (20 loc) · 763 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.PHONY: console
ROOT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
# Heroku stack to use for the console. This can be override by setting STACK
# (e.g. STACK=heroku-22 make console).
STACK ?= "heroku-24"
# Change stack to image with tag (e.g. heroku/heroku:24-build)
IMAGE := "heroku/$(shell echo ${STACK} | sed 's/-/:/')-build"
console:
@docker pull --quiet $(IMAGE)
@echo
@echo "Console Help"
@echo
@echo "Specify a version to install:"
@echo " echo 5.2.1 > /env/JEMALLOC_VERSION"
@echo
@echo "To vendor jemalloc:"
@echo " bin/compile /tmp/build/{app,cache,env}"
@echo
@docker run --rm -ti -v $(ROOT_DIR):/buildpack -e "STACK=$(STACK)" -w /buildpack $(IMAGE) \
bash -c 'mkdir -p /tmp/build/{app,cache,env}; exec bash'