Permalink
Browse files

build straregy changed

  • Loading branch information...
DavertMik committed Sep 13, 2012
1 parent 6c921f1 commit a4780d2c9840c43dc56ce62a972e5b7ee430dc02
@@ -5,29 +5,23 @@
$root = __DIR__.'/../';
chdir($root);
@mkdir("package/pear");
chdir('package/pear');
// Clone from GitHub
system('git clone git://github.com/Codeception/Codeception.git .');
// install Codeception from Composer
$composer = file_get_contents('http://getcomposer.org/installer');
file_put_contents('composer.phar', $composer);
system('php composer.phar install');
// download composer
file_put_contents('composer.phar', file_get_contents('http://getcomposer.org/installer'));
system('php composer.phar install');
system('php composer.phar update');
// grab pear repository
@mkdir("package/pear-site");
system('git clone git@github.com:Codeception/pear.git package/pear-site');
system('git clone git@github.com:Codeception/pear.git package/pear');
// build package
system('pearfarm build');
system('pirum add package/pear-site Codeception-'.$version.'.tgz');
system('pirum add package/pear Codeception-'.$version.'.tgz');
@unlink("Codeception-$version.tgz");
// push new package
chdir('package/pear-site');
chdir('package/pear');
system('git add -A');
system('git commit -m="version '.$version.'"');
system('git push origin gh-pages');
@@ -9,32 +9,15 @@
// download composer
chdir(__DIR__.'/../');
@mkdir("package/phar");
chdir('package/phar');
@unlink('codecep.phar');
file_put_contents('composer.phar', file_get_contents('http://getcomposer.org/installer'));
file_put_contents('composer.json','
{
"require": {
"codeception/codeception": "*"
},
"minimum-stability": "dev"
}
');
system('php composer.phar install');
system('php composer.phar install');
system('php composer.phar update');
$compiler = new \Codeception\Compiler();
$compiler->compile();
$compiler = new \Codeception\Compiler($root.'/pacakge/phar');
$compiler->compile($root.'/package/codecept.phar');
chdir('..');
ob_start();
@system('del /s /q /F phar');
@system('rd /s /q phar');
@system('rm -rf phar');
ob_clean();
copy('codecept.phar', 'package/codecept.phar');
unlink('codecept.phar');
echo system('php codecept.phar');

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit a4780d2

Please sign in to comment.