Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moved resources to root dir, removed pear stuff

  • Loading branch information...
commit f84b85ca4a752036bdc659e788f8907b24e97554 1 parent 6e2ff99
William Durand willdurand authored
0  tools/generator/resources/dtd/database.dtd → resources/dtd/database.dtd
View
File renamed without changes
0  tools/generator/resources/xsd/custom_datatypes.xsd → resources/xsd/custom_datatypes.xsd
View
File renamed without changes
0  tools/generator/resources/xsd/database.xsd → resources/xsd/database.xsd
View
File renamed without changes
0  tools/generator/resources/xsl/database.xsl → resources/xsl/database.xsl
View
File renamed without changes
0  tools/generator/resources/xsl/dbd2propel.xsl → resources/xsl/dbd2propel.xsl
View
File renamed without changes
260 tools/generator/pear/BuildPropelGenPEARPackageTask.php
View
@@ -1,260 +0,0 @@
-<?php
-
-/**
- * This file is part of the Propel package.
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- *
- * @license MIT License
- */
-/*
- * $Id$
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * This software consists of voluntary contributions made by many individuals
- * and is licensed under the LGPL. For more information please see
- * <http://phing.info>.
- */
-
-require_once 'phing/tasks/system/MatchingTask.php';
-include_once 'phing/types/FileSet.php';
-include_once 'phing/tasks/ext/pearpackage/Fileset.php';
-
-/**
- *
- * @author Hans Lellelid <hans@xmpl.org>
- * @package phing.tasks.ext
- * @version $Revision$
- */
-class BuildPropelGenPEARPackageTask extends MatchingTask
-{
-
- /** Base directory for reading files. */
- private $dir;
-
- private $version;
- private $state = 'stable';
- private $notes;
-
- private $filesets = array();
-
- /** Package file */
- private $packageFile;
-
- public function init()
- {
- include_once 'PEAR/PackageFileManager2.php';
- if (!class_exists('PEAR_PackageFileManager2')) {
- throw new BuildException("You must have installed PEAR_PackageFileManager2 (PEAR_PackageFileManager >= 1.6.0) in order to create a PEAR package.xml file.");
- }
- }
-
- private function setOptions($pkg)
- {
- $options['baseinstalldir'] = 'propel';
- $options['packagedirectory'] = $this->dir->getAbsolutePath();
-
- if (empty($this->filesets)) {
- throw new BuildException("You must use a <fileset> tag to specify the files to include in the package.xml");
- }
-
- $options['filelistgenerator'] = 'Fileset';
-
- // Some PHING-specific options needed by our Fileset reader
- $options['phing_project'] = $this->getProject();
- $options['phing_filesets'] = $this->filesets;
-
- if ($this->packageFile !== null) {
- // create one w/ full path
- $f = new PhingFile($this->packageFile->getAbsolutePath());
- $options['packagefile'] = $f->getName();
- // must end in trailing slash
- $options['outputdirectory'] = $f->getParent() . DIRECTORY_SEPARATOR;
- $this->log("Creating package file: " . $f->getPath(), Project::MSG_INFO);
- } else {
- $this->log("Creating [default] package.xml file in base directory.", Project::MSG_INFO);
- }
-
- // add baseinstalldir exceptions
- $options['installexceptions'] = array(
- 'pear-propel-gen' => '/',
- 'pear-propel-gen.bat' => '/',
- );
-
- $options['dir_roles'] = array(
- 'lib' => 'data',
- 'resources' => 'data'
- );
-
- $options['exceptions'] = array(
- 'pear-propel-gen.bat' => 'script',
- 'pear-propel-gen' => 'script',
- );
-
- $pkg->setOptions($options);
-
- }
-
- /**
- * Main entry point.
- * @return void
- */
- public function main()
- {
- if ($this->dir === null) {
- throw new BuildException("You must specify the \"dir\" attribute for PEAR package task.");
- }
-
- if ($this->version === null) {
- throw new BuildException("You must specify the \"version\" attribute for PEAR package task.");
- }
-
- $package = new PEAR_PackageFileManager2();
-
- $this->setOptions($package);
-
- // the hard-coded stuff
- $package->setPackage('propel_generator');
- $package->setSummary('Generator component of the Propel PHP object persistence layer');
- $package->setDescription('Propel is an object persistence layer for PHP5 based on Apache Torque. This package provides the generator engine that builds PHP classes and SQL DDL based on an XML representation of your data model.');
- $package->setChannel('pear.propelorm.org');
- $package->setPackageType('php');
-
- $package->setReleaseVersion($this->version);
- $package->setAPIVersion($this->version);
-
- $package->setReleaseStability($this->state);
- $package->setAPIStability($this->state);
-
- $package->setNotes($this->notes);
-
- $package->setLicense('MIT', 'http://www.opensource.org/licenses/mit-license.php');
-
- // Add package maintainers
- $package->addMaintainer('lead', 'hans', 'Hans Lellelid', 'hans@xmpl.org');
- $package->addMaintainer('lead', 'david', 'David Zuelke', 'dz@bitxtender.com');
- $package->addMaintainer('lead', 'francois', 'Francois Zaninotto', 'fzaninotto@[gmail].com');
- $package->addMaintainer('lead', 'couac', 'William Durand', 'william.durand1@[gmail].com');
-
- // creating a sub-section for 'windows'
- $package->addRelease();
- $package->setOSInstallCondition('windows');
- $package->addInstallAs('pear-propel-gen.bat', 'propel-gen.bat');
- $package->addIgnoreToRelease('pear-propel-gen');
-
- // creating a sub-section for non-windows
- $package->addRelease();
- $package->addInstallAs('pear-propel-gen', 'propel-gen');
- $package->addIgnoreToRelease('pear-propel-gen.bat');
-
- // "core" dependencies
- $package->setPhpDep('5.2.4');
- $package->setPearinstallerDep('1.4.0');
-
- // "package" dependencies
- $package->addPackageDepWithChannel('required', 'phing', 'pear.phing.info', '2.3.0');
-
- $package->addExtensionDep('required', 'pdo');
- $package->addExtensionDep('required', 'xml');
- $package->addExtensionDep('required', 'xsl');
-
- // now add the replacements ....
- $package->addReplacement('pear-propel-gen.bat', 'pear-config', '@DATA-DIR@', 'data_dir');
- $package->addReplacement('pear-propel-gen', 'pear-config', '@DATA-DIR@', 'data_dir');
-
- // now we run this weird generateContents() method that apparently
- // is necessary before we can add replacements ... ?
- $package->generateContents();
-
- $e = $package->writePackageFile();
-
- if (PEAR::isError($e)) {
- throw new BuildException("Unable to write package file.", new Exception($e->getMessage()));
- }
-
- }
-
- /**
- * Used by the PEAR_PackageFileManager_PhingFileSet lister.
- * @return array FileSet[]
- */
- public function getFileSets()
- {
- return $this->filesets;
- }
-
- // -------------------------------
- // Set properties from XML
- // -------------------------------
-
- /**
- * Nested creator, creates a FileSet for this task
- *
- * @return FileSet The created fileset object
- */
- public function createFileSet()
- {
- $num = array_push($this->filesets, new FileSet());
-
- return $this->filesets[$num-1];
- }
-
- /**
- * Set the version we are building.
- * @param string $v
- * @return void
- */
- public function setVersion($v)
- {
- $this->version = $v;
- }
-
- /**
- * Set the state we are building.
- * @param string $v
- * @return void
- */
- public function setState($v)
- {
- $this->state = $v;
- }
-
- /**
- * Sets release notes field.
- * @param string $v
- * @return void
- */
- public function setNotes($v)
- {
- $this->notes = $v;
- }
- /**
- * Sets "dir" property from XML.
- * @param PhingFile $f
- * @return void
- */
- public function setDir(PhingFile $f)
- {
- $this->dir = $f;
- }
-
- /**
- * Sets the file to use for generated package.xml
- */
- public function setDestFile(PhingFile $f)
- {
- $this->packageFile = $f;
- }
-
-}
159 tools/generator/pear/build-pear-package.xml
View
@@ -1,159 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- This build file creates a minimal package of propel-generator files,
- builds a package.xml for installation using PEAR and creates the necessary TGZ file.
-
- It's pretty easy to build the PEAR package:
-
- $> cd /path/to/propel-generator
- $> phing -Dversion=1.0.0RC1 -f pear\build-pear-package.xml
-
--->
-
-<project name="propel_generator" default="main">
-
- <property name="propelgen.home" value=".."/>
- <property name="build.base.dir" value="build"/>
- <property name="pkgname" value="${phing.project.name}-${version}"/>
- <property name="build.src.dir" value="${build.base.dir}/${pkgname}"/>
-
- <!-- some default properties -->
- <property name="notes"><![CDATA[
- This is a release of the 1.6 branch of the Propel Generator.
- ]]></property>
- <property name="state" value="stable"/>
-
- <taskdef
- name="pear-package"
- classname="BuildPropelGenPEARPackageTask" classpath="."/>
-
- <fileset dir="${propelgen.home}/lib" id="lib">
- <include name="**"/>
- </fileset>
-
- <fileset dir="${propelgen.home}/resources" id="resources">
- <include name="**"/>
- </fileset>
-
- <fileset dir="${propelgen.home}" id="root">
- <include name="build-propel.xml"/>
- <include name="default.properties"/>
- </fileset>
-
- <fileset dir="${propelgen.home}" id="pear">
- <include name="pear/pear-build.xml"/>
- <include name="pear/pear-propel*"/>
- <include name="pear/build.properties"/>
- </fileset>
-
- <!--
- ==============================================
- Main entry point
- ==============================================
- -->
- <target name="main" if="version" depends="versioncheck">
- <phingcall target="build"/>
- <phingcall target="pear-package"/>
- <phingcall target="tar"/>
- </target>
-
- <!--
- ===================================================================
- Target: checks if language was given, otherwise fail
- ===================================================================
- -->
- <target name="versioncheck" unless="version">
- <echo message="====================================================="/>
- <echo message="Version not specified. You must enter a version. In"/>
- <echo message="the future you can add this to build.properties or"/>
- <echo message="enter it on the command line: "/>
- <echo message=" "/>
- <echo message="-Dversion=1.0.0"/>
- <echo message="====================================================="/>
- <input propertyname="version" promptChar=":">Propel version for package</input>
-
- <property name="pkgname" value="${phing.project.name}-${version}" override="true"/>
- <property name="build.src.dir" value="${build.base.dir}/${pkgname}" override="true"/>
-
- </target>
-
- <!--
- ==============================================
- Copy the desired files into the build/ dir
- making sure to put them in the directory
- structure that will be needed for PEAR install
- ==============================================
- -->
- <target name="build">
- <echo>-----------------------------</echo>
- <echo>| Creating directory layout |</echo>
- <echo>-----------------------------</echo>
-
- <delete dir="${build.base.dir}"/>
- <mkdir dir="${build.base.dir}"/>
-
- <copy todir="${build.src.dir}">
- <fileset refid="root"/>
- <fileset refid="pear"/>
- </copy>
-
- <copy todir="${build.src.dir}/lib">
- <fileset refid="lib"/>
- </copy>
-
- <copy todir="${build.src.dir}/resources">
- <fileset refid="resources"/>
- </copy>
-
- <!-- some files need to be manually moved here to save headache when
- doing the pear package.xml creation -->
- <move file="${build.src.dir}/pear/build.properties" todir="${build.src.dir}"/>
- <move file="${build.src.dir}/pear/pear-build.xml" todir="${build.src.dir}"/>
- <move file="${build.src.dir}/pear/pear-propel-gen" todir="${build.src.dir}"/>
- <move file="${build.src.dir}/pear/pear-propel-gen.bat" todir="${build.src.dir}"/>
- <delete dir="${build.src.dir}/pear/"/>
-
- <chmod file="${build.src.dir}/pear-propel-gen" mode="755"/>
-
- </target>
-
- <!--
- ==============================================
- Create a PEAR package.xml which will guide the
- installation.
- ==============================================
- -->
- <target name="pear-package">
-
- <echo>-----------------------------</echo>
- <echo>| Creating PEAR package.xml |</echo>
- <echo>-----------------------------</echo>
- <echo></echo>
-
- <pear-package dir="${build.src.dir}" destFile="${build.base.dir}/package.xml" version="${version}" state="${state}" notes="${notes}">
-
- <fileset dir="${build.src.dir}">
- <include name="**"/>
- </fileset>
-
- </pear-package>
-
- </target>
-
- <!--
- ==============================================
- Create a tar.gz of the files, which will be
- installed by pear package manager.
- ==============================================
- -->
- <target name="tar">
- <echo>-----------------------------</echo>
- <echo>| Creating tar.gz package |</echo>
- <echo>-----------------------------</echo>
- <property name="tarfile" value="${build.base.dir}/${pkgname}.tgz"/>
- <delete file="${tarfile}"/>
- <tar destFile="${tarfile}" basedir="${build.base.dir}" />
- </target>
-
-</project>
5 tools/generator/pear/build.properties
View
@@ -1,5 +0,0 @@
-# In this file you can define any properties taht you want to affect
-# all projects built using the propel-gen script on this system
-#
-# See http://www.propelorm.org/wiki/Documentation/1.6/BuildConfiguration
-# for a list of available properties.
167 tools/generator/pear/pear-build.xml
View
@@ -1,167 +0,0 @@
-<!--
- Use this file to faciliate easy per-project building using
- PEAR-installed Propel-generator.
-
- This Phing script is invoked via the shell script propel-gen (.bat
- for Windows). Normally you should not need to edit this script or
- be aware of it in any way.
-
- Normal use:
- $> propel-gen insert-sql
-
- Specific target:
- $> propel-gen /path/to/my/project insert-sql
-
--->
-<project name="propel-project-builder" default="main">
-
-<!-- set a default target if none provided -->
-<property name="target" value="main"/>
-
-<resolvepath propertyName="propel.project.dir" file="${project.dir}" dir="${application.startdir}"/>
-
-<target name="projdircheckExists">
- <condition property="projDirExists">
- <and>
- <not>
- <equals arg1="${propel.project.dir}" arg2="" trim="true"/>
- </not>
- <available file="${propel.project.dir}/build.properties"/>
- </and>
- </condition>
-</target>
-
-<target name="projdircheck" depends="projdircheckExists" unless="projDirExists">
- <echo message="====================================================="/>
- <echo message="Project directory not specified or invalid. You must "/>
- <echo message="specify the path to your project directory and your "/>
- <echo message="project directory must contain your build.properties "/>
- <echo message="and schema.xml files. "/>
- <echo message=" "/>
- <echo message="Usage: "/>
- <echo message=" "/>
- <echo message="$&gt; propel-gen /path/to/projectdir [target]"/>
- <echo message=" "/>
- <echo message="====================================================="/>
- <fail message="No project directory specified."/>
-</target>
-
-<target name="configure" depends="projdircheck">
- <if>
- <isset property="additional.properties"/>
- <then>
- <echo>Processing additional properties file: ${additional.properties}</echo>
- <resolvepath propertyName="additional.properties.resolved" file="${additional.properties}" dir="${application.startdir}"/>
- <property file="${additional.properties.resolved}"/>
- </then>
- </if>
- <echo msg="Loading project-specific props from ${project.dir}/build.properties"/>
- <property file="${propel.project.dir}/build.properties"/>
-</target>
-
-<target name="main" depends="configure"
- description="The main target. Includes project-specific build.properties and calls the build-propel.xml script">
-
- <!--<property file="${project.dir}/build.properties"/>-->
- <phing phingfile="build-propel.xml" target="${target}"/>
-
-</target>
-
-
-<!--
- Convenience mappings to build-propel.xml main targets
-
- This makes it possible to use this buildfile w/o needing to specify
- target as a property, e.g.:
-
- $> phing -Dproject=bookstore insert-sql
-
- The main reason for this is just consistency w/ old build-propel.xml file
- (primarily for documentation & user confusion avoidance reasons). There are relatively
- few & infrequently changing main targets of build-propel.xml, so it's a non-
- issue as far as maintenance is concerned.
--->
-
-<target name="convert-conf" depends="configure">
- <phing phingfile="build-propel.xml" target="convert-conf"/>
-</target>
-
-<target name="create-db" depends="configure">
- <phing phingfile="build-propel.xml" target="create-db"/>
-</target>
-
-<target name="reverse" depends="configure">
- <phing phingfile="build-propel.xml" target="reverse"/>
-</target>
-
-<target name="datadtd" depends="configure">
- <phing phingfile="build-propel.xml" target="datadtd"/>
-</target>
-
-<target name="datadump" depends="configure">
- <phing phingfile="build-propel.xml" target="datadump"/>
-</target>
-
-<target name="datasql" depends="configure">
- <phing phingfile="build-propel.xml" target="datasql"/>
-</target>
-
-<target name="insert-sql" depends="configure">
- <phing phingfile="build-propel.xml" target="insert-sql"/>
-</target>
-
-<target name="om" depends="configure">
- <phing phingfile="build-propel.xml" target="om"/>
-</target>
-
-<target name="sql" depends="configure">
- <phing phingfile="build-propel.xml" target="sql"/>
-</target>
-
-<target name="sql-diff" depends="configure">
- <phing phingfile="build-propel.xml" target="sql-diff"/>
-</target>
-
-<target name="diff" depends="sql-diff" />
-
-<target name="migration-status" depends="configure">
- <phing phingfile="build-propel.xml" target="migration-status"/>
-</target>
-
-<target name="status" depends="migration-status" />
-
-<target name="migration-up" depends="configure">
- <phing phingfile="build-propel.xml" target="migration-up"/>
-</target>
-
-<target name="migrate-up" depends="migration-up" />
-
-<target name="up" depends="migration-up" />
-
-<target name="migration-down" depends="configure">
- <phing phingfile="build-propel.xml" target="migration-down"/>
-</target>
-
-<target name="migrate-down" depends="migration-down" />
-
-<target name="down" depends="migration-down" />
-
-<target name="migration" depends="configure">
- <phing phingfile="build-propel.xml" target="migration"/>
-</target>
-
-<target name="migrate" depends="migration" />
-
-<target name="old-sql" depends="configure">
- <phing phingfile="build-propel.xml" target="old-sql"/>
-</target>
-
-<target name="dbd2propel" depends="configure">
- <phing phingfile="build-propel.xml" target="dbd2propel"/>
-</target>
-
-<target name="graphviz" depends="configure">
- <phing phingfile="build-propel.xml" target="graphviz"/>
-</target>
-
-</project>
207 tools/runtime/pear/BuildPropelPEARPackageTask.php
View
@@ -1,207 +0,0 @@
-<?php
-
-/**
- * This file is part of the Propel package.
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- *
- * @license MIT License
- */
-
-require_once 'phing/tasks/system/MatchingTask.php';
-include_once 'phing/types/FileSet.php';
-include_once 'phing/tasks/ext/pearpackage/Fileset.php';
-
-/**
- *
- * @author Hans Lellelid <hans@xmpl.org>
- * @package phing.tasks.ext
- * @version $Revision$
- */
-class BuildPropelPEARPackageTask extends MatchingTask
-{
-
- /** Base directory for reading files. */
- private $dir;
-
- private $version;
- private $state = 'stable';
- private $notes;
-
- private $filesets = array();
-
- /** Package file */
- private $packageFile;
-
- public function init()
- {
- include_once 'PEAR/PackageFileManager2.php';
- if (!class_exists('PEAR_PackageFileManager2')) {
- throw new BuildException("You must have installed PEAR_PackageFileManager2 (PEAR_PackageFileManager >= 1.6.0) in order to create a PEAR package.xml file.");
- }
- }
-
- private function setOptions($pkg)
- {
- $options['baseinstalldir'] = 'propel';
- $options['packagedirectory'] = $this->dir->getAbsolutePath();
-
- if (empty($this->filesets)) {
- throw new BuildException("You must use a <fileset> tag to specify the files to include in the package.xml");
- }
-
- $options['filelistgenerator'] = 'Fileset';
-
- // Some PHING-specific options needed by our Fileset reader
- $options['phing_project'] = $this->getProject();
- $options['phing_filesets'] = $this->filesets;
-
- if ($this->packageFile !== null) {
- // create one w/ full path
- $f = new PhingFile($this->packageFile->getAbsolutePath());
- $options['packagefile'] = $f->getName();
- // must end in trailing slash
- $options['outputdirectory'] = $f->getParent() . DIRECTORY_SEPARATOR;
- $this->log("Creating package file: " . $f->getPath(), Project::MSG_INFO);
- } else {
- $this->log("Creating [default] package.xml file in base directory.", Project::MSG_INFO);
- }
-
- $pkg->setOptions($options);
-
- }
-
- /**
- * Main entry point.
- * @return void
- */
- public function main()
- {
- if ($this->dir === null) {
- throw new BuildException("You must specify the \"dir\" attribute for PEAR package task.");
- }
-
- if ($this->version === null) {
- throw new BuildException("You must specify the \"version\" attribute for PEAR package task.");
- }
-
- $package = new PEAR_PackageFileManager2();
-
- $this->setOptions($package);
-
- // the hard-coded stuff
- $package->setPackage('propel_runtime');
- $package->setSummary('Runtime component of the Propel PHP object persistence layer');
- $package->setDescription('Propel is an object persistence layer for PHP5 based on Apache Torque. This package provides the runtime engine that transparently handles object persistence and retrieval.');
- $package->setChannel('pear.propelorm.org');
- $package->setPackageType('php');
-
- $package->setReleaseVersion($this->version);
- $package->setAPIVersion($this->version);
-
- $package->setReleaseStability($this->state);
- $package->setAPIStability($this->state);
-
- $package->setNotes($this->notes);
-
- $package->setLicense('MIT', 'http://www.opensource.org/licenses/mit-license.php');
-
- // Add package maintainers
- $package->addMaintainer('lead', 'hans', 'Hans Lellelid', 'hans@xmpl.org');
- $package->addMaintainer('lead', 'david', 'David Zuelke', 'dz@bitxtender.com');
- $package->addMaintainer('lead', 'francois', 'Francois Zaninotto', 'fzaninotto@[gmail].com');
- $package->addMaintainer('lead', 'couac', 'William Durand', 'william.durand1@[gmail].com');
-
- // "core" dependencies
- $package->setPhpDep('5.2.0');
- $package->setPearinstallerDep('1.4.0');
-
- // "package" dependencies
- $package->addExtensionDep('required', 'pdo');
- $package->addExtensionDep('required', 'spl');
-
- // now we run this weird generateContents() method that apparently
- // is necessary before we can add replacements ... ?
- $package->generateContents();
-
- $e = $package->writePackageFile();
-
- if (PEAR::isError($e)) {
- throw new BuildException("Unable to write package file.", new Exception($e->getMessage()));
- }
-
- }
-
- /**
- * Used by the PEAR_PackageFileManager_PhingFileSet lister.
- * @return array FileSet[]
- */
- public function getFileSets()
- {
- return $this->filesets;
- }
-
- // -------------------------------
- // Set properties from XML
- // -------------------------------
-
- /**
- * Nested creator, creates a FileSet for this task
- *
- * @return FileSet The created fileset object
- */
- public function createFileSet()
- {
- $num = array_push($this->filesets, new FileSet());
-
- return $this->filesets[$num-1];
- }
-
- /**
- * Set the version we are building.
- * @param string $v
- * @return void
- */
- public function setVersion($v)
- {
- $this->version = $v;
- }
-
- /**
- * Set the state we are building.
- * @param string $v
- * @return void
- */
- public function setState($v)
- {
- $this->state = $v;
- }
-
- /**
- * Sets release notes field.
- * @param string $v
- * @return void
- */
- public function setNotes($v)
- {
- $this->notes = $v;
- }
- /**
- * Sets "dir" property from XML.
- * @param PhingFile $f
- * @return void
- */
- public function setDir(PhingFile $f)
- {
- $this->dir = $f;
- }
-
- /**
- * Sets the file to use for generated package.xml
- */
- public function setDestFile(PhingFile $f)
- {
- $this->packageFile = $f;
- }
-
-}
120 tools/runtime/pear/build-pear-package.xml
View
@@ -1,120 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- This build file creates a minimal package of propel-runtime files,
- builds a package.xml for installation using PEAR and creates the necessary TGZ file.
-
--->
-
-<project name="propel_runtime" default="main">
-
- <property name="propel.home" value=".."/>
- <property name="build.base.dir" value="build"/>
- <property name="pkgname" value="${phing.project.name}-${version}"/>
- <property name="build.src.dir" value="${build.base.dir}/${pkgname}"/>
-
- <!-- some default properties -->
- <property name="notes"><![CDATA[
- This is a release of the 1.6 branch of the Propel Generator.
- ]]></property>
- <property name="state" value="stable"/>
-
- <taskdef
- name="pear-package"
- classname="BuildPropelPEARPackageTask" classpath="."/>
-
- <fileset dir="${propel.home}/lib" id="classes">
- <include name="**"/>
- </fileset>
-
- <!--
- ==============================================
- Main entry point
- ==============================================
- -->
- <target name="main" if="version" depends="versioncheck">
- <phingcall target="build"/>
- <phingcall target="pear-package"/>
- <phingcall target="tar"/>
- </target>
-
- <!--
- ===================================================================
- Target: checks if language was given, otherwise fail
- ===================================================================
- -->
- <target name="versioncheck" unless="version">
- <echo message="====================================================="/>
- <echo message="Version not specified. You must enter a version. In"/>
- <echo message="the future you can add this to build.properties or"/>
- <echo message="enter it on the command line: "/>
- <echo message=" "/>
- <echo message="-Dversion=1.0.0"/>
- <echo message="====================================================="/>
- <input propertyname="version" promptChar=":">Propel version for package</input>
-
- <property name="pkgname" value="${phing.project.name}-${version}" override="true"/>
- <property name="build.src.dir" value="${build.base.dir}/${pkgname}" override="true"/>
-
- </target>
-
- <!--
- ==============================================
- Copy the desired files into the build/ dir
- making sure to put them in the directory
- structure that will be needed for PEAR install
- ==============================================
- -->
- <target name="build">
- <echo>-----------------------------</echo>
- <echo>| Creating directory layout |</echo>
- <echo>-----------------------------</echo>
-
- <delete dir="${build.base.dir}"/>
- <mkdir dir="${build.base.dir}"/>
-
- <copy todir="${build.src.dir}">
- <fileset refid="classes"/>
- </copy>
-
- </target>
-
- <!--
- ==============================================
- Create a PEAR package.xml which will guide the
- installation.
- ==============================================
- -->
- <target name="pear-package">
-
- <echo>-----------------------------</echo>
- <echo>| Creating PEAR package.xml |</echo>
- <echo>-----------------------------</echo>
- <echo></echo>
-
- <pear-package dir="${build.src.dir}" destFile="${build.base.dir}/package.xml" version="${version}" state="${state}" notes="${notes}">
-
- <fileset dir="${build.src.dir}">
- <include name="**"/>
- </fileset>
-
- </pear-package>
-
- </target>
-
- <!--
- ==============================================
- Create a tar.gz of the files, which will be
- installed by pear package manager.
- ==============================================
- -->
- <target name="tar">
- <echo>-----------------------------</echo>
- <echo>| Creating tar.gz package |</echo>
- <echo>-----------------------------</echo>
- <property name="tarfile" value="${build.base.dir}/${pkgname}.tgz"/>
- <delete file="${tarfile}"/>
- <tar destFile="${tarfile}" basedir="${build.base.dir}" />
- </target>
-
-</project>
Please sign in to comment.
Something went wrong with that request. Please try again.