Commit d3425360 authored by Robert Lyon's avatar Robert Lyon

Bug 1826284: Generate a pdf file via chrome headless

Set up composer to include chrome-php/chrome

behatnotneeded

Change-Id: Icc6b12ffbb57c85351217a66c66925fa9351d863
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent cea413f5
......@@ -38,5 +38,6 @@ node_modules/
htdocs/.externalToolBuilders/
htdocs/auth/saml/extlib/simplesamlphp
htdocs/auth/saml/sp/resources
htdocs/lib/chrome-php
package-lock.json
*\:Zone.Identifier\:\$DATA
......@@ -73,6 +73,24 @@ else
@echo "Done!"
endif
pdfexportfile := $(shell ls -d htdocs/lib/chrome-php/headless-chromium-php-master 2>/dev/null)
cleanpdfexport:
@echo "Cleaning out PDF export files..."
rm -rf htdocs/lib/chrome-php
pdfexport: initcomposer
ifdef pdfexportfile
@echo "PDF export files already exists - doing nothing"
else
@echo "Pulling Headless-chromium-php from download ..."
@curl -sSL https://github.com/chrome-php/headless-chromium-php/archive/master.zip -o pdf_tmp.zip && unzip pdf_tmp.zip -d htdocs/lib/chrome-php && rm pdf_tmp.zip
@php external/composer.phar --working-dir=htdocs/lib/chrome-php/headless-chromium-php-master install
@find htdocs/lib/chrome-php/headless-chromium-php-master -type f -name composer.json -delete
@find htdocs/lib/chrome-php/headless-chromium-php-master -type f -name composer.lock -delete
@find htdocs/lib/chrome-php -type d -name Tests -exec rm -r {} +
@echo "Done!"
endif
vendorphpunit := $(shell external/vendor/bin/phpunit --version 2>/dev/null)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment