Changeset 13572

Show
Ignore:
Timestamp:
11/22/07 15:49:48 (10 months ago)
Author:
tarjei
Message:

closes #188
* Moved static dir down one place (after testing phing install and phing packageCore)
* Removed need for version.php
* Made core version something that is set by phing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/build.xml

    r12611 r13572  
    66    <property name="absolute_basedir" value="" /> 
    77    <property name="phpdocdir" value="documentation/api" /> 
     8    <property name="coreVersion" value="2.9.0beta16" /> 
    89    <resolvepath propertyName="absolute_basedir" file="${project.basedir}"/> 
    910 
     
    109110            template="${project.basedir}/midcom.core/package-template.xml" 
    110111            returnProperty="pear_name" 
     112            version="${coreVersion}" 
    111113        > 
    112114        </packageMidCOMcore> 
     115 
     116        <move file="${project.basedir}/midcom.core/midcom/config/midcom_config.php"  
     117            tofile="${project.basedir}/midcom.core/midcom/config/midcom_config.php~" 
     118            overwrite="true" 
     119            /> 
     120 
     121        <!-- insert midcom version into the correct file. 
     122        @todo: consider moving the original out of the package dir  
     123        --> 
     124        <copy file="${project.basedir}/midcom.core/midcom/config/midcom_config.php~"  
     125            tofile="${project.basedir}/midcom.core/midcom/config/midcom_config.php" 
     126            overwrite="true" 
     127            > 
     128            <filterchain> 
     129              <replacetokens begintoken="##" endtoken="##"> 
     130                  <token key="MIDCOM_VERSION" value="${coreVersion}" /> 
     131                </replacetokens> 
     132            </filterchain> 
     133        </copy> 
     134 
     135 
     136 
    113137        <pearPackagePackage  
    114138            path="${project.basedir}/midcom.core" 
    115139            target_dir="${target_dir}" 
    116140            /> 
     141 
     142        <copy file="${project.basedir}/midcom.core/midcom/config/midcom_config.php~"  
     143            overwrite="true" 
     144            tofile="${project.basedir}/midcom.core/midcom/config/midcom_config.php" /> 
     145 
     146 
    117147        <echo>Package ${pear_name} created in ${target_dir}</echo> 
    118148    </target> 
  • trunk/midcom/build/installMidcomCore.php

    r13424 r13572  
    141141         * Make symlinks for the static files 
    142142         */ 
    143         $dirs = $this->get_module_dirs($this->from . "/static"); 
     143        $dirs = $this->get_module_dirs($this->from . "/../static"); 
    144144         
    145145        foreach ($dirs as $dir => $value) { 
    146             $from =  "{$this->from}/static/$dir"; 
     146            $from =  "{$this->from}/../static/$dir"; 
    147147            $to   =  "{$this->static_dir}/$dir";    
    148148            $this->make_symlink($from, $to); 
  • trunk/midcom/build/packageMidCOMcore.php

    r12894 r13572  
    4040 
    4141        protected $returnProperty; // name of property to set to return value 
     42    protected $version; 
    4243 
    4344        /** 
     
    8384        $this->stability = $s; 
    8485    } 
     86    public function setVersion($s) { 
     87        $this->version = $s; 
     88    } 
     89 
    8590 
    8691    // todo: add a setVersion from the commandline 
     
    128133        $package->addRole('xml', 'mgdschema'); 
    129134 
     135        var_dump($this->version); 
     136 
    130137        $package->generateContents(); 
    131138 
     
    192199        $package->setAPIStability($this->stability); 
    193200        $package->setPhpDep($this->phpversion); 
     201        $package->setReleaseVersion($this->version); 
    194202        echo "Done with makeBase\n\n"; 
    195203        return $package; 
  • trunk/midcom/midcom.core/midcom.php

    r13439 r13572  
    5858/////////////////////////////////////// 
    5959//Constants, Globals and Configuration 
    60 require('version.php'); 
    6160require('constants.php'); 
    6261require('globals.php'); 
  • trunk/midcom/midcom.core/midcom/config/midcom_config.php

    r13439 r13572  
    319319 */ 
    320320$GLOBALS['midcom_config_default'] = Array(); 
    321  
     321/** 
     322 * MidCOM version 
     323 * @global string  
     324 */ 
     325$GLOBALS['midcom_version'] = '##MIDCOM_VERSION##'; 
    322326// Initialize Helpers 
    323327$phpversion = phpversion();