diff --git a/.gitignore b/.gitignore index eaef89d..cda50ab 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.lock diff.txt phpmd.xml phpmd-tests.xml +diffFilter.phar diff --git a/CreatePhar.php b/CreatePhar.php index 8c7aebc..c3ba913 100644 --- a/CreatePhar.php +++ b/CreatePhar.php @@ -1,6 +1,11 @@ getPathname(); $path = $dir . substr($fullPath, $codeLength); + + if (strpos($path, '/test/') !== false) { + continue; + } + if (is_file($path)) { - $phar->addFile($path); + $phar->addFromString($path, php_strip_whitespace($path)); } } } + +function cleanUp($pharName) +{ + shell_exec("rm -rf vendor"); + shell_exec("rm $pharName"); + shell_exec("composer install --no-dev -o"); +}