projects
/
pharext
/
pharext
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
b632c5f
)
verbose packaging
author
Michael Wallner
<mike@php.net>
Sat, 28 Mar 2015 10:58:36 +0000
(11:58 +0100)
committer
Michael Wallner
<mike@php.net>
Sat, 28 Mar 2015 10:58:36 +0000
(11:58 +0100)
src/pharext/Task/PharBuild.php
patch
|
blob
|
history
diff --git
a/src/pharext/Task/PharBuild.php
b/src/pharext/Task/PharBuild.php
index d6f27881823ffdbce6e0d99036b71be50039c3f3..5468755832d34ed61f97b7e9710ed9931616e054 100644
(file)
--- a/
src/pharext/Task/PharBuild.php
+++ b/
src/pharext/Task/PharBuild.php
@@
-68,10
+68,27
@@
class PharBuild implements Task
$phar->buildFromIterator((new Task\BundleGenerator)->run());
if ($this->source) {
$phar->buildFromIterator((new Task\BundleGenerator)->run());
if ($this->source) {
- $phar->buildFromIterator($this->source, $this->source->getBaseDir());
+ if ($verbose) {
+ $bdir = $this->source->getBaseDir();
+ $blen = strlen($bdir);
+ foreach ($this->source as $index => $file) {
+ if (is_resource($file)) {
+ printf("Packaging %s ...\n", $index);
+ } else {
+ printf("Packaging %s ...\n", $index = trim(substr($file, $blen), "/"));
+ }
+ $phar[$index] = $file;
+ }
+ } else {
+ $phar->buildFromIterator($this->source, $this->source->getBaseDir());
+ }
}
$phar->stopBuffering();
}
$phar->stopBuffering();
+
+ foreach (new \RecursiveIteratorIterator($phar) as $file) {
+ printf("Packaged %s ...\n", $file);
+ }
if (!chmod($temp, fileperms($temp) | 0111)) {
throw new Exception;
if (!chmod($temp, fileperms($temp) | 0111)) {
throw new Exception;