#!/usr/bin/php -q 5 ) ExitError( 'Invalid arguments. Operation aborted.' ) ; if ( count( $argv ) < 4 ) ExitError( 'Please specify the source and the target directories and the version number.' ) ; $sourceDir = $argv[1] ; $targetDir = $argv[2] ; $version = $argv[3] ; // Get the package definition file. $xmlFileName = 'fckreleaser.xml' ; if ( isset( $argv[4] ) ) $xmlFileName = $argv[4] ; echo '### Release started', "\n\n" ; // ### Copy the files. $releaser = new FCKReleaser( $sourceDir, $targetDir, $xmlFileName ) ; $releaser->Run() ; // ### Set version and build information. FCKVersionMarker::Mark( $targetDir, $version ) ; echo "\n", '### Compress source', "\n\n" ; // ### Run the packager in the target directory. // Save the current directory. $curDir = getcwd() ; // Move to the target ; chdir( $targetDir ) ; // Run the packager. $packager = new FCKPackager() ; $packager->LoadDefinitionFile( 'fckpackager.xml' ) ; $packager->Run() ; // Move back to the startup dir. chdir( $curDir ) ; echo "\n\n", '### Release finished (version "', $version, '")', "\n" ; ?>