-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
makefile
59 lines (47 loc) · 2.31 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
build-resolvers: build-resolver-linux build-resolver-darwin
.build:
mkdir -p .build
build-resolver-darwin: .build
cargo install heroku-nodejs-utils --root .build --bin resolve_version --git https://github.com/heroku/buildpacks-nodejs --target x86_64-apple-darwin --profile release
mv .build/bin/resolve_version lib/vendor/resolve-version-darwin
build-resolver-linux: .build
cargo install heroku-nodejs-utils --root .build --bin resolve_version --git https://github.com/heroku/buildpacks-nodejs --target x86_64-unknown-linux-musl --profile release
mv .build/bin/resolve_version lib/vendor/resolve-version-linux
test: heroku-22-build heroku-20-build heroku-24-build
test-binary:
go test -v ./cmd/... -tags=integration
shellcheck:
@shellcheck -x bin/compile bin/detect bin/release bin/test bin/test-compile
@shellcheck -x lib/*.sh
@shellcheck -x ci-profile/**
@shellcheck -x etc/**
heroku-24-build:
@echo "Running tests in docker (heroku-24-build)..."
@docker run --platform "linux/amd64" -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-24" heroku/heroku:24-build bash -c 'cp -r /buildpack ~/buildpack_test; cd ~/buildpack_test/; test/run;'
@echo ""
heroku-22-build:
@echo "Running tests in docker (heroku-22-build)..."
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-22" heroku/heroku:22-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
@echo ""
heroku-20-build:
@echo "Running tests in docker (heroku-20-build)..."
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-20" heroku/heroku:20-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
@echo ""
hatchet:
@echo "Running hatchet integration tests..."
@bash etc/ci-setup.sh
@bash etc/hatchet.sh spec/ci/
@echo ""
nodebin-test:
@echo "Running test for Node v${TEST_NODE_VERSION}..."
@bash etc/ci-setup.sh
@bash etc/hatchet.sh spec/nodebin/
@echo ""
unit:
@echo "Running unit tests in docker (heroku-22)..."
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-22" heroku/heroku:22 bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/unit;'
@echo ""
shell:
@echo "Opening heroku-22 shell..."
@docker run -v $(shell pwd):/buildpack:ro --rm -it heroku/heroku:22 bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; bash'
@echo ""