Updated version number for latest release

And removed unused code.
This commit is contained in:
Rich Morgan 2015-01-12 15:25:51 -05:00
parent 31e24362ae
commit 5b60c5f9fb
1 changed files with 16 additions and 7 deletions

View File

@ -11,7 +11,7 @@ date_default_timezone_set('America/New_York'); // Main Office is in Eastern Time
/**
* Various Configuration Settings
*/
$version = '2.1.1';
$version = '2.1.2';
$vendorDir = __DIR__ . '/../vendor';
$distDir = __DIR__ . '/../build/dist';
$tmpDistDir = $distDir . '/tmp'; // Files will be placed here temporarly so we can zip/tar them.
@ -32,6 +32,7 @@ $finder
->in($vendorDir . '/symfony/filesystem/')
->in($vendorDir . '/symfony/dependency-injection/')
->exclude('Tests');
foreach ($finder as $file) {
$path = $file->getRelativePathname();
$filesystem->mkdir(
@ -55,6 +56,7 @@ $filesystem->mirror('app/', sprintf('%s/app/', $tmpDistDir));
$filesystem->mirror('lib/', sprintf('%s/lib/', $tmpDistDir));
$filesystem->copy('LICENSE', sprintf('%s/app/code/community/Bitpay/Core/LICENSE', $tmpDistDir));
$filesystem->copy('README.md', sprintf('%s/app/code/community/Bitpay/Core/README.md', $tmpDistDir));
// All required files are in the temp. distribution directory
/**
@ -71,7 +73,9 @@ $xml->addChild('extends');
$xml->addChild('summary');
$xml->addChild('description');
$xml->addChild('notes');
$authorsNode = $xml->addChild('authors');
$authors = array(
array(
'Integrations Team', // Name
@ -79,25 +83,31 @@ $authors = array(
'support@bitpay.com', // Email
),
);
foreach ($authors as $author) {
$authorNode = $authorsNode->addChild('author');
$authorNode->addChild('name', $author[0]);
$authorNode->addChild('user', $author[1]);
$authorNode->addChild('email', $author[2]);
}
$xml->addChild('date', date('Y-m-d'));
$xml->addChild('time', date('G:i:s'));
$xml->addChild('compatible');
$xml->addChild('dependencies');
$requiredNode = $xml->addChild('required', 'php');
$requiredNode->addAttribute('php_min', '5.4.0');
$requiredNode->addAttribute('php_max', '6.0.0');
$extensionsNode = $xml->addChild('extensions');
foreach (array('openssl', 'mcrypt') as $ext) {
$extNode = $extensionsNode->addChild('name', $ext);
$extNode->addChild('min');
$extNode->addChild('max');
}
$targetNode = $xml->addChild('contents')->addChild('target');
$targetNode->addAttribute('name', 'mage');
@ -126,18 +136,17 @@ foreach ($finder as $file) {
$fileNode->addAttribute('name', $file->getBaseName());
$fileNode->addAttribute('hash', md5_file($file->getRealPath()));
}
$xml->asXml($tmpDistDir . '/package.xml');
// package.xml created, just need to tar/zip everything
$xml->asXml($tmpDistDir . '/package.xml');
// package.xml created, just need to tar/zip everything
$filesystem->remove($distFile.'.zip');
$filesystem->remove($distFile.'.tgz');
//$process = new \Symfony\Component\Process\Process(
// sprintf('cd %s; zip -r %s .', $tmpDistDir, $distFile.'.zip')
//);
//$process->run();
$process = new \Symfony\Component\Process\Process(
sprintf('cd %s; tar -czf %s *', $tmpDistDir, $distFile.'.tgz')
);
$process->run();
// Cleanup