Commit c3665e59 authored by Hendrik Heneke's avatar Hendrik Heneke
Browse files

Prepared phar generation.

parent a63ae050
.idea
.phpunit.result.cache
/build/
/vendor/
<?php
if(!file_exists('build')) {
mkdir('build');
}
if(file_exists('build/cfgen.phar')) {
unlink('build/cfgen.phar');
}
$pharName = 'build/cfgen.phar';
$p = new Phar($pharName, FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::KEY_AS_FILENAME, basename($pharName));
$p->startBuffering();
$p->setStub("#!/usr/bin/env php\n<?php Phar::mapPhar(); include \"phar://$pharName/src/cfgen.php\"; __HALT_COMPILER(); ?>");
$p->buildFromDirectory('.', '/(src|vendor)\/(.*)\.php$/', );
$p->stopBuffering();
chmod('build/cfgen.phar', 0755);
......@@ -44,7 +44,9 @@
"bin/cfgen"
],
"scripts": {
"cfgen:standalone:generate-configs:test": "bin/cfgen cfgen:generate-configs --env test --overwrite",
"build:phar": "php -d phar.readonly=0 build-phar.php",
"test-run:bin": "bin/cfgen cfgen:generate-configs --env test --project fixture --overwrite",
"test-run:phar": "build/cfgen.phar cfgen:generate-configs --env test --project fixture --overwrite",
"php-cs:check": "php-cs-fixer fix --dry-run --stop-on-violation --using-cache=no --rules=-line_ending src",
"php-cs:fix": "php-cs-fixer fix --using-cache=no src"
}
......
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