Skip to content

Commit

Permalink
issue #55 : removing devs dependencies and tests from phar. Saved aro…
Browse files Browse the repository at this point in the history
…und 3M
  • Loading branch information
Halleck45 committed Nov 8, 2014
1 parent 1255565 commit 9feb80c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
build: test
php build.php
mkdir -p /tmp/phpmetrics-build
cp * -R /tmp/phpmetrics-build
rm -Rf /tmp/phpmetrics-build/vendor /tmp/phpmetrics-build/composer.lock
cd /tmp/phpmetrics-build && composer.phar install --no-dev --optimize-autoloader --prefer-dist && php build.php
cp /tmp/phpmetrics-build/build/phpmetrics.phar build/phpmetrics.phar
rm -Rf /tmp/phpmetrics-build
./vendor/bin/phpunit -c phpunit.xml.dist --group=binary && echo "Done"

test:
./vendor/bin/phpunit -c phpunit.xml.dist
2 changes: 1 addition & 1 deletion build.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


$files = array_merge(rglob('*.php'), rglob('*.twig'), rglob('*.json'), rglob('*.pp'));
$exclude = '!(.git)|(.svn)!';
$exclude = '!(.git)|(.svn)|(bin)|(tests)|(Tests)!';
foreach($files as $file) {
if(preg_match($exclude, $file)) continue;
$path = str_replace(__DIR__.'/', '', $file);
Expand Down
Binary file modified build/phpmetrics.phar
Binary file not shown.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"symfony/console": "~2.4",
"hoa/ruler": "~1.0",
"symfony/config": "~2.4",
"symfony/yaml": "~2.4",
"ext-dom": "*"
},
"require-dev": {
Expand Down
6 changes: 6 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
</testsuite>
</testsuites>

<groups>
<exclude>
<group>binary</group>
</exclude>
</groups>

<filter>
<whitelist>
<directory>./src</directory>
Expand Down

0 comments on commit 9feb80c

Please sign in to comment.