bin/build improvement packing only necessary files

This commit is contained in:
Rafael Reis 2016-02-25 20:28:19 -03:00
parent e73dc3d5c5
commit a189df7fd5
3 changed files with 27 additions and 17 deletions

22
.gitignore vendored
View File

@ -1,9 +1,21 @@
material/
vendor/
# root
cache.properties
bin/phpcs
bin/phpcbf
# bin
bin/*
!bin/php-gameboy
!bin/php-gameboy.phar
# material
material/
# vendor
vendor/
# roms
roms/
# global
*.gb
*.gbc
*.rom
*.rom

View File

@ -2,6 +2,7 @@
<?php
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;
require_once(__DIR__ . '/../vendor/autoload.php');
@ -46,22 +47,19 @@ $phar = new Phar(
$phar->setSignatureAlgorithm(\Phar::SHA1);
$phar->startBuffering();
addFile($phar, new SplFileInfo('boot.php', $rootDir . '/boot.php', 'boot.php'));
addFile($phar, new SplFileInfo('composer.json', $rootDir . '/composer.json', 'composer.json'));
addFile($phar, new SplFileInfo('vendor/autoload.php', $rootDir . '/vendor/autoload.php', 'vendor/autoload.php'));
$finder = new Finder();
$finder->files()
->ignoreVCS(true)
->name('*.php')
->exclude('bin')
->exclude('.gitignore')
->exclude('.travis.yml')
->exclude('README.md')
->exclude('build.xml')
->exclude('cache.properties')
->exclude('composer.json')
->exclude('composer.lock')
->exclude('docker-php-7')
->exclude('phpcs.xml')
->exclude('.git')
->in($rootDir)
->in([
$rootDir . '/src/',
$rootDir . '/vendor/composer',
$rootDir . '/vendor/whatthejeff',
])
->sort($finderSort)
;

Binary file not shown.