Changeset 3053

Show
Ignore:
Timestamp:
10/19/08 06:54:43 (3 months ago)
Author:
impl
Message:

Fix #875: Clean up the Phing components of the project configuration system

Location:
branches/1.0
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/CHANGELOG

    r3046 r3053  
    22=============== 
    33 
    4 1.0.0 beta 4 (October 17, 2008) 
     41.0.0 beta 4 (October 19, 2008) 
    55------------------------------- 
    66 
     7CHG: Clean up the Phing components of the project configuration system (#875) (Noah) 
    78CHG: Change Form Population Filter to use validation system's ability to more accurately handle different sources of input (#786) (David) 
    89CHG: Validation system needs to be able to tell two fields of same names, but from different sources, apart (#785) (Dominik) 
  • branches/1.0/src/build/agavi/phing/AgaviBuildLogger.php

    r2596 r3053  
    1414// +---------------------------------------------------------------------------+ 
    1515 
    16 require_once('phing/listener/DefaultLogger.php'); 
     16require_once('phing/listener/AnsiColorLogger.php'); 
    1717 
    1818/** 
     
    3030 * @version    $Id$ 
    3131 */ 
    32 class AgaviBuildLogger extends DefaultLogger 
     32class AgaviBuildLogger extends AnsiColorLogger 
    3333{ 
    3434  public function buildStarted(BuildEvent $event) 
  • branches/1.0/src/build/agavi/script/agavi.php

    r2603 r3053  
    4141$GLOBALS['PROPERTIES'] = array(); 
    4242$GLOBALS['SHOW_LIST'] = false; 
     43$GLOBALS['VERBOSE'] = false; 
    4344$GLOBALS['LOGGER'] = 'AgaviProxyBuildLogger'; 
    4445$GLOBALS['BUILD'] = new PhingFile(BUILD_DIRECTORY . '/build.xml'); 
     
    5253  $GLOBALS['OUTPUT']->write('  -v --version                     Displays relevant version information' . PHP_EOL); 
    5354  $GLOBALS['OUTPUT']->write('  -l --list --targets              Displays the list of available targets' . PHP_EOL); 
    54   $GLOBALS['OUTPUT']->write('  -D --define <property> <value>   Defines a build property' . PHP_EOL); 
     55  $GLOBALS['OUTPUT']->write('  -D --define <property> <value>   Defines a configuration property' . PHP_EOL); 
     56  $GLOBALS['OUTPUT']->write('  --verbose                        Provides more verbose configuration information' . PHP_EOL); 
    5557  $GLOBALS['OUTPUT']->write('  --agavi-source-directory <path>  Sets the Agavi source directory to <path>' . PHP_EOL); 
    5658  $GLOBALS['OUTPUT']->write('  --include-path <path>            Appends <path> to the PHP include path' . PHP_EOL); 
    57   $GLOBALS['OUTPUT']->write('  --logger <class>                 Sets the build logger class to <class>' . PHP_EOL); 
     59  $GLOBALS['OUTPUT']->write('  --logger <class>                 Sets the configuration logger class to <class>' . PHP_EOL); 
    5860} 
    5961 
     
    6668function input_version(AgaviOptionParser $parser, $name, $arguments, $scriptArguments) 
    6769{ 
    68   $GLOBALS['OUTPUT']->write('Agavi build system, script version $Id$' . PHP_EOL); 
     70  $GLOBALS['OUTPUT']->write('Agavi project configuration system, script version $Id$' . PHP_EOL); 
    6971  $GLOBALS['OUTPUT']->write(Phing::getPhingVersion() . PHP_EOL); 
    7072  exit(0); 
     
    8284   
    8385  $GLOBALS['PROPERTIES'][$name] = $value; 
     86} 
     87 
     88function input_verbose(AgaviOptionParser $parser, $name, $arguments, $scriptArguments) 
     89{ 
     90  $GLOBALS['VERBOSE'] = true; 
    8491} 
    8592 
     
    113120$parser->addOption('list', array('l'), array('list', 'targets'), 'input_list'); 
    114121$parser->addOption('define', array('D'), array('define'), 'input_define', 2); 
     122$parser->addOption('verbose', array(), array('verbose'), 'input_verbose'); 
    115123$parser->addOption('agavi_source_directory', array(), array('agavi-source-directory'), 'input_agavi_source_directory', 1); 
    116124$parser->addOption('include_path', array(), array('include-path'), 'input_include_path', 1); 
     
    222230  } 
    223231  $logger = new $GLOBALS['LOGGER'](); 
    224   $logger->setMessageOutputLevel(Project::MSG_INFO); 
     232  $logger->setMessageOutputLevel($GLOBALS['VERBOSE'] ? Project::MSG_VERBOSE : Project::MSG_INFO); 
    225233  $logger->setOutputStream($GLOBALS['OUTPUT']); 
    226234  $logger->setErrorStream($GLOBALS['ERROR']);