Skip to content

Commit

Permalink
Packaging fix and regeneration of package.xml for 1.0.0b2.
Browse files Browse the repository at this point in the history
  • Loading branch information
boenrobot committed May 13, 2017
1 parent 500e931 commit 5abea5c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
15 changes: 8 additions & 7 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@ This package abstracts this away, so that when you want to get exactly N amount
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2016-11-07</date>
<time>03:01:58</time>
<date>2017-05-13</date>
<time>16:35:14</time>
<version>
<release>1.0.0b1</release>
<release>1.0.0b2</release>
<api>1.0.0</api>
</version>
<stability>
<release>beta</release>
<api>stable</api>
</stability>
<license uri="http://www.gnu.org/copyleft/lesser.html">LGPL License 2.1</license>
<notes>* Fixed a streaming issue with newer PHP 5.6 versions and later.
* Stream::setIsBlocking() is only implicitly called if needed (i.e. for encrypted connections), ensuring compatibility with web hosts that for bizzare reasons have disabled stream_set_blocking().
* Doc and test fixes that now ensure large code coverage.</notes>
<notes>* Fixed &quot;failed to parse address&quot; error that occurs in patched PHP versions for Debian 7 and Ubuntu 16.04.
- **NOTE:** Persistent connections still fail in those environments, and there's no possible workaround, short of getting a non-patched PHP version or upgrading to Debian 8 or Ubuntu 16.10.</notes>
<contents>
<dir name="/">
<dir name="docs" baseinstalldir="/">
Expand All @@ -40,7 +39,9 @@ This package abstracts this away, so that when you want to get exactly N amount
<file role="doc" name="phpdoc.dist.xml">
<tasks:replace type="pear-config" to="php_dir" from="../src"/>
</file>
<file role="doc" name="sami.php"/>
<file role="doc" name="sami.php">
<tasks:replace type="package-info" to="version" from="GIT: $Id$"/>
</file>
</dir>
<dir name="src" baseinstalldir="/">
<dir name="PEAR2">
Expand Down
12 changes: 9 additions & 3 deletions packagexmlsetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@

$oldCwd = getcwd();
chdir(__DIR__);
$package->setRawRelease('php', '');
$release = $package->getReleaseToInstall('php');
foreach (new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(
'.',
Expand All @@ -84,8 +86,12 @@
),
RecursiveIteratorIterator::LEAVES_ONLY
) as $path) {
$filename = substr($path->getPathname(), 2);
$cFilename = str_replace('src/', 'php/', $filename);
if ('.git' === $path->getFilename()) {
continue;
}

$filename = substr($path->getPathname(), 2);
$cFilename = str_replace('src/', 'php/', $filename);

if (isset($package->files[$filename])) {
$parsedFilename = pathinfo($filename);
Expand All @@ -107,7 +113,7 @@
$as = substr($as, 0, -4);
}
}
$package->getReleaseToInstall('php')->installAs($filename, $as);
$release->installAs($filename, $as);

$contents = file_get_contents($filename);
foreach ($config['replace'] as $from => $attribs) {
Expand Down

0 comments on commit 5abea5c

Please sign in to comment.