Development

/plugins/ddFacebookPlatformPlugin/autopackage2.php

You must first sign up to be able to contribute.

root/plugins/ddFacebookPlatformPlugin/autopackage2.php

Revision 6584, 2.0 kB (checked in by kupokomapa, 9 months ago)

[sfFacebookPlatformPlugin] Added a script to create PEAR packages for the plugin.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /**
4  * script to automate the generation of the
5  * package.xml file.
6  *
7  * @author      Kiril Angov
8  * @package     sfFacebookPlatformPlugin
9  */
10
11 require_once 'PEAR/PackageFileManager2.php';
12
13 /**
14  * Base version
15  */
16 $baseVersion = '1.0.0';
17
18 /**
19  * current version
20  */
21 $version  = $baseVersion;
22 $dir      = dirname( __FILE__ );
23
24 /**
25  * Current API version
26  */
27 $apiVersion = '1.0.0';
28
29 /**
30  * current state
31  */
32 $state = 'stable';
33
34 /**
35  * current API stability
36  */
37 $apiStability = 'stable';
38
39 /**
40  * release notes
41  */
42 $notes = <<<EOT
43 --
44 EOT;
45
46 /**
47  * package description
48  */
49 $description = "Gives you everything needed to develop Facebook applications with Symfony.";
50
51 $package = new PEAR_PackageFileManager2();
52
53 $result = $package->setOptions(array(
54   'filelistgenerator' => 'file',
55   'ignore'            => array('autopackage2.php', 'package.xml', '.svn'),
56   'simpleoutput'      => true,
57   'baseinstalldir'    => 'sfFacebookPlatformPlugin/',
58   'packagedirectory'  => $dir
59 ));
60 if (PEAR::isError($result)) {
61   echo $result->getMessage();
62   die();
63 }
64
65 $package->setPackage('sfFacebookPlatformPlugin');
66 $package->setSummary('Make Facebook applications with symfony.');
67 $package->setDescription($description);
68
69 $package->setChannel('pear.symfony-project.com');
70 $package->setAPIVersion($apiVersion);
71 $package->setReleaseVersion($version);
72 $package->setReleaseStability($state);
73 $package->setAPIStability($apiStability);
74 $package->setNotes($notes);
75 $package->setPackageType('php');
76 $package->setLicense('MIT License', 'http://www.symfony-project.com/license');
77
78 $package->addMaintainer('lead', 'kupokomapa', 'Kiril Angov', 'kupokomapa@gmail.com', 'yes');
79
80 $package->setPhpDep('5.1.0');
81 $package->setPearinstallerDep('1.4.1');
82
83 $package->addPackageDepWithChannel(
84   'required',
85   'symfony',
86   'pear.symfony-project.com',
87   '1.0.0',
88   '1.1.0',
89   false,
90   '1.1.0'
91 );
92
93 $package->generateContents();
94
95 $result = $package->writePackageFile();
96 if (PEAR::isError($result)) {
97     echo $result->getMessage();
98     die();
99 }
100
Note: See TracBrowser for help on using the browser.