forked from heroku/heroku-buildpack-go
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
37 lines (28 loc) · 978 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
27
28
29
30
31
32
33
34
35
36
37
TMP := ''
IMAGE := heroku/heroku:16-build
BASH_COMMAND := /bin/bash
GO_BUCKET_URL := file:///buildpack/test/assets
.PHONY: test shell quick publish docker test-assets
.DEFAULT: test
.NOTPARALLEL: docker test-assets
# make ACCESS_KEY="..." SECRET_KEY="...." sync
sync:
ACCESS_KEY=$(ACCESS_KEY) SECRET_KEY=$(SECRET_KEY) ./bin/sync-files.sh
test: BASH_COMMAND := test/run
test: docker
shell: docker
quick: BASH_COMMAND := test/quick; bash
quick: docker
# make FIXTURE=<fixture name> compile
compile: BASH_COMMAND := test/quick compile $(FIXTURE); bash
compile: docker
publish:
bin/publish heroku/go
docker: test-assets
$(eval TMP := $(shell bin/copy true))
@echo "Running docker ($(IMAGE)) with /buildpack=$(TMP) ..."
@docker run -v $(TMP):/buildpack:ro --rm -it -e "GITHUB_TOKEN=$(GITHUB_TOKEN)" -e "GO_BUCKET_URL=$(GO_BUCKET_URL)" $(IMAGE) bash -c "cd /buildpack; $(BASH_COMMAND)"
@rm -rf $(TMP)
test-assets:
@echo "Setting up test assets"
@bin/fetch-test-assets