forked from bgentry/heroku-buildpack-go
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
37 lines (27 loc) · 928 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:20-build
BASH_COMMAND := /bin/bash
.PHONY: test shell quick publish docker test-assets
.DEFAULT: test
.NOTPARALLEL: docker test-assets
sync:
./sbin/sync-files.sh
test: BASH_COMMAND := test/run.sh
test: docker
shell: docker
quick: BASH_COMMAND := test/quick.sh; bash
quick: docker
# make FIXTURE=<fixture name> ENV=<FOO=BAR> compile
compile: BASH_COMMAND := test/quick.sh compile $(FIXTURE) $(ENV); bash
compile: docker
testpack: BASH_COMMAND := test/quick.sh dotest $(FIXTURE) $(ENV); bash
testpack: docker
publish:
@bash sbin/publish.sh
docker: test-assets
@echo "Running tests in docker using $(IMAGE)"
@docker pull $(IMAGE)
@docker run -v $(PWD):/buildpack:ro --rm -it -e "GITLAB_TOKEN=$(GITLAB_TOKEN)" -e "GITHUB_TOKEN=$(GITHUB_TOKEN)" -e "IMAGE=$(IMAGE)" $(IMAGE) bash -c "cd /buildpack; $(BASH_COMMAND)"
test-assets:
@echo "Setting up test assets"
@sbin/fetch-test-assets