diff --git a/makephar.sdl b/makephar.sdl index dffab2f..100b2ab 100644 --- a/makephar.sdl +++ b/makephar.sdl @@ -1,9 +1,6 @@ phar "makephar.phar" { - // Set to true to build a library-only phar - library false; - // Set stub stub "src/bootstrap.php"; @@ -13,4 +10,8 @@ phar "makephar.phar" { dir "src"; } + exclude { + dir ".git"; + } + } diff --git a/src/MakePhar/Application.php b/src/MakePhar/Application.php index 076e68c..38d0653 100644 --- a/src/MakePhar/Application.php +++ b/src/MakePhar/Application.php @@ -98,7 +98,8 @@ class Application $manifests = Manifest::createFromFile($this->config->manifest); foreach ($manifests as $manifest) { - log_info("Building %s", $manifest->getOutput()); + $type = $manifest->getIsLibrary()?"library":"application"; + log_info("Building %s %s", $type, $manifest->getOutput()); $builder = new PharBuilder($manifest); $builder->prepare(); $builder->build(); diff --git a/src/MakePhar/Manifest.php b/src/MakePhar/Manifest.php index a2d6395..4b34fc4 100644 --- a/src/MakePhar/Manifest.php +++ b/src/MakePhar/Manifest.php @@ -57,13 +57,19 @@ class Manifest foreach ($tag->getChildren() as $child) switch ($child->getTagName()) { case 'library': - $mf->setIsLibrary($child->getValue()?:true); + $val = $child->getValue(); + if ($val === null) $val = true; + $mf->setIsLibrary($val); break; case 'compress': - $mf->setCompression($child->getValue()?:true); + $val = $child->getValue(); + if ($val === null) $val = true; + $mf->setCompression($val); break; case 'verbatim': - $mf->setVerbatim($child->getValue()?:true); + $val = $child->getValue(); + if ($val === null) $val = true; + $mf->setVerbatim($val); break; case 'stub': $mf->setStubFile($child->getValue());