source: pro-violet-viettel/sourcecode/api.violet.vn/www/plugins/sfPropel13Plugin/autopackage2.php

Last change on this file was 289, checked in by dungnv, 11 years ago
File size: 2.4 KB
Line 
1<?php
2/**
3 * script to automate the generation of the
4 * package.xml file.
5 *
6 * Originally writted by Stephan Schmidt <schst@php-tools.net>
7 *
8 * @author      Joshua May
9 * @package     sfPropel13Plugin
10 */
11
12require_once 'PEAR/PackageFileManager2.php';
13
14/**
15 * Base version
16 */
17$baseVersion = '0.6.0';
18
19/**
20 * current version
21 */
22$version    = $baseVersion;
23$dir        = dirname( __FILE__ );
24
25/**
26 * Current API version
27 */
28$apiVersion = '0.6.0';
29
30/**
31 * current state
32 */
33$state = 'beta';
34
35/**
36 * current API stability
37 */
38$apiStability = 'beta';
39
40/**
41 * release notes
42 */
43$notes = <<<EOT
44--
45EOT;
46
47/**
48 * package description
49 */
50$description = <<<EOT
51sfPropel13Plugin instroduces Propel 1.3 (beta) functionality into symfony 1.0. It *should* work without modifying
52any core libraries, thus offering greater stability (despite being beta, it's now using PDO instead of Creole), and
53immensely improved performance.
54EOT;
55
56$package = new PEAR_PackageFileManager2();
57
58$result = $package->setOptions(array(
59    'filelistgenerator' => 'file',
60    'ignore'            => array('autopackage2.php', 'package.xml', '.svn'),
61    'simpleoutput'      => true,
62    'baseinstalldir'    => '/',
63    'packagedirectory'  => $dir,
64    'dir_roles'         => array(
65                                 'docs' => 'doc',
66                                 'examples' => 'doc',
67                                 'tests' => 'test',
68                                 )
69    ));
70if (PEAR::isError($result)) {
71    echo $result->getMessage();
72    die();
73}
74
75$package->setPackage('sfPropel13Plugin');
76$package->setSummary('Propel 1.3 (beta) functionality in symfony 1.0');
77$package->setDescription($description);
78
79$package->setChannel('pear.symfony-project.com');
80$package->setAPIVersion($apiVersion);
81$package->setReleaseVersion($version);
82$package->setReleaseStability($state);
83$package->setAPIStability($apiStability);
84$package->setNotes($notes);
85$package->setPackageType('php');
86$package->setLicense('MIT License', 'http://www.symfony-project.com/license');
87
88$package->addMaintainer('lead', 'notjosh', 'Joshua May', 'josh@notjosh.com', 'yes');
89
90$package->setPhpDep('5.2.0');
91$package->setPearinstallerDep('1.4.1');
92
93$package->addPackageDepWithChannel(
94        'required',
95    'symfony',
96        'pear.symfony-project.com',
97    '1.0.0',
98        '1.1.0',
99        false,
100        '1.1.0');
101
102
103$package->generateContents();
104
105$result = $package->writePackageFile();
106
107if (PEAR::isError($result)) {
108    echo $result->getMessage();
109    die();
110}
Note: See TracBrowser for help on using the repository browser.