forked from dscout/wkhtmltopdf-buildpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from iCHEF/upgrade-wkhtmltopdf-to-0-12-5
[Upgrade wkhtmltopdf] - [2] upgrade wkhtmltopdf to 0.12.5
- Loading branch information
Showing
5 changed files
with
95 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
testrunner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
current_dir := $(shell pwd) | ||
|
||
sync-lib-and-bin-from-testrunner: | ||
# usage: | ||
# cd ../ && git clone https://github.com/heroku/heroku-buildpack-testrunner | ||
# make sync-lib-and-bin-from-testrunner testrunner-dir=../heroku-buildpack-testrunner | ||
mkdir -p ${current_dir}/testrunner | ||
|
||
rm -rf ${current_dir}/testrunner/lib | ||
cp -rf ${testrunner-dir}/lib ${current_dir}/testrunner/lib | ||
|
||
rm -rf ${current_dir}/testrunner/bin | ||
cp -rf ${testrunner-dir}/bin ${current_dir}/testrunner/bin | ||
|
||
prepare-testrunner-image: | ||
# Prepare test-runner image for "Different OS" | ||
# | ||
# You will get following images by build this target | ||
# | ||
# 1. heroku-16-buildpack-test-runner | ||
# 2. heroku-20-buildpack-test-runner | ||
docker build . \ | ||
-f $(current_dir)/docker/Dockerfile.testrunner \ | ||
-t heroku-16-buildpack-test-runner \ | ||
--build-arg ubuntu_version=16 | ||
|
||
docker build . \ | ||
-f $(current_dir)/docker/Dockerfile.testrunner \ | ||
-t heroku-20-buildpack-test-runner \ | ||
--build-arg ubuntu_version=20 | ||
|
||
docker-test: | ||
# usage | ||
# make docker-test image=heroku-20-buildpack-test-runner | ||
docker run -it -v $(current_dir):/app/buildpack:ro ${image} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ARG ubuntu_version | ||
|
||
FROM heroku/heroku:$ubuntu_version | ||
|
||
WORKDIR /usr/local/lib | ||
|
||
RUN curl --silent https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/shunit2/shunit2-2.1.6.tgz | tar xz | ||
|
||
ENV SHUNIT_HOME /usr/local/lib/shunit2-2.1.6 | ||
|
||
# content in directory testrunner is copy from https://github.com/heroku/heroku-buildpack-testrunner | ||
# it provide utils to run test of this project | ||
ADD testrunner/bin /app/testrunner/bin | ||
ADD testrunner/lib /app/testrunner/lib | ||
|
||
CMD ["-c", "/app/buildpack"] | ||
ENTRYPOINT ["/app/testrunner/bin/run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
. ${BUILDPACK_TEST_RUNNER_HOME}/lib/test_utils.sh | ||
|
||
testCompile() { | ||
${BUILDPACK_HOME}/bin/compile ${BUILD_DIR} ${BUILD_DIR} # this comand can see echo logs | ||
|
||
wkhtmltopdf http://google.com google.pdf | ||
|
||
assertEquals "google.pdf" "$(ls -a | grep google.pdf)" | ||
} |