Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
updated package script to take the version as an argument
  • Loading branch information
rodnaph committed Aug 21, 2011
1 parent 136904f commit 2388b56
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.xml
Expand Up @@ -16,7 +16,7 @@
<target name="test" depends="test-php,test-cs" description="Run all tests"></target> <target name="test" depends="test-php,test-cs" description="Run all tests"></target>


<target name="pear-package"> <target name="pear-package">
<exec command="php package.php" passthru="true" /> <exec command="php package.php ${version}" passthru="true" />
<exec command="pear package lib/package.xml" passthru="true" /> <exec command="pear package lib/package.xml" passthru="true" />
</target> </target>


Expand Down
12 changes: 9 additions & 3 deletions package.php
Expand Up @@ -11,12 +11,18 @@
* @link http://github.com/boxuk/describr * @link http://github.com/boxuk/describr
* @since 1.4.0 * @since 1.4.0
*/ */
define( 'VERSION', '1.4.4' );
define( 'BOXUK_PEAR_CHANNEL', 'pear.boxuk.net' ); define( 'BOXUK_PEAR_CHANNEL', 'pear.boxuk.net' );


require_once( 'PEAR/PackageFileManager2.php' ); require_once( 'PEAR/PackageFileManager2.php' );
require_once( 'PEAR/PackageFileManager/File.php' ); require_once( 'PEAR/PackageFileManager/File.php' );


@list( $IGNORE, $version ) = $_SERVER['argv'];

if ( !$version ) {
echo "usage: php package.php VERSION\n";
exit( 1 );
}

$aFilesToIgnore = array(); $aFilesToIgnore = array();
$aFilesToIgnore[] = 'bootstrap.php'; $aFilesToIgnore[] = 'bootstrap.php';


Expand All @@ -33,8 +39,8 @@
$packagexml->setSummary( 'Dependency Injection and Reflection' ); $packagexml->setSummary( 'Dependency Injection and Reflection' );
$packagexml->setDescription( '-' ); $packagexml->setDescription( '-' );
$packagexml->setChannel( BOXUK_PEAR_CHANNEL ); $packagexml->setChannel( BOXUK_PEAR_CHANNEL );
$packagexml->setAPIVersion( VERSION ); $packagexml->setAPIVersion( $version );
$packagexml->setReleaseVersion( VERSION ); $packagexml->setReleaseVersion( $version );
$packagexml->setReleaseStability( 'stable' ); $packagexml->setReleaseStability( 'stable' );
$packagexml->setAPIStability( 'stable' ); $packagexml->setAPIStability( 'stable' );
$packagexml->setNotes( "-" ); $packagexml->setNotes( "-" );
Expand Down

0 comments on commit 2388b56

Please sign in to comment.