Skip to content
Browse files

Dont bother with pear since we have no idea how it works :)

  • Loading branch information...
1 parent e302814 commit 5a0f936b33f853abe9d5434d41b2291f8c188630 @dcramer dcramer committed Feb 1, 2012
Showing with 0 additions and 106 deletions.
  1. +0 −42 bin/create_pear_package.php
  2. +0 −64 package.xml.tpl
View
42 bin/create_pear_package.php
@@ -1,42 +0,0 @@
-<?php
-
-if (!isset($argv[1]))
-{
- die('You must provide the version (1.0.0)');
-}
-
-if (!isset($argv[2]))
-{
- die('You must provide the stability (alpha, beta, or stable)');
-}
-
-$context = array(
- 'date' => date('Y-m-d'),
- 'time' => date('H:m:00'),
- 'version' => $argv[1],
- 'api_version' => $argv[1],
- 'stability' => $argv[2],
- 'api_stability' => $argv[2],
-);
-
-$context['files'] = '';
-$path = realpath(dirname(__FILE__).'/../lib/Raven');
-foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::LEAVES_ONLY) as $file)
-{
- if (preg_match('/\.php$/', $file))
- {
- $name = str_replace($path.'/', '', $file);
- $context['files'] .= ' <file install-as="Raven/'.$name.'" name="'.$name.'" role="php" />'."\n";
- }
-}
-
-$template = file_get_contents(dirname(__FILE__).'/../package.xml.tpl');
-$content = preg_replace_callback('/\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/', 'replace_parameters', $template);
-file_put_contents(dirname(__FILE__).'/../package.xml', $content);
-
-function replace_parameters($matches)
-{
- global $context;
-
- return isset($context[$matches[1]]) ? $context[$matches[1]] : null;
-}
View
64 package.xml.tpl
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.8.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
- http://pear.php.net/dtd/tasks-1.0.xsd
- http://pear.php.net/dtd/package-2.0
- http://pear.php.net/dtd/package-2.0.xsd">
- <name>Twig</name>
- <channel>pear.twig-project.org</channel>
- <summary>Twig is a PHP template engine.</summary>
- <description>
- Twig is a template language for PHP, released under the new BSD license
- (code and documentation).
-
- Twig uses a syntax similar to the Django and Jinja template languages which
- inspired the Twig runtime environment.
- </description>
- <lead>
- <name>Fabien Potencier</name>
- <user>fabpot</user>
- <email>fabien.potencier@symfony-project.org</email>
- <active>yes</active>
- </lead>
- <lead>
- <name>Armin Ronacher</name>
- <user>armin</user>
- <email>armin.ronacher@active-4.com</email>
- <active>no</active>
- </lead>
- <date>{{ date }}</date>
- <time>{{ time }}</time>
- <version>
- <release>{{ version }}</release>
- <api>{{ api_version }}</api>
- </version>
- <stability>
- <release>{{ stability }}</release>
- <api>{{ stability }}</api>
- </stability>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">BSD Style</license>
- <notes>-</notes>
- <contents>
- <dir name="/">
- <file name="AUTHORS" role="doc" />
- <file name="CHANGELOG" role="doc" />
- <file name="LICENSE" role="doc" />
- <file name="README.markdown" role="doc" />
- <dir name="lib">
- <dir name="Twig">
-{{ files }}
- </dir>
- </dir>
- </dir>
- </contents>
- <dependencies>
- <required>
- <php>
- <min>5.2.4</min>
- </php>
- <pearinstaller>
- <min>1.4.0</min>
- </pearinstaller>
- </required>
- </dependencies>
- <phprelease />
-</package>

0 comments on commit 5a0f936

Please sign in to comment.
Something went wrong with that request. Please try again.