// ******************************* $build = 'prod'; // Use test for testing the script or prod for production use // Common configs for test/prod $workingCopy = $maoWcTrunk; $revisionToCheckOut = 0; $syncDestinationDir1 = $maoDevTempDir; $syncDestinationDir2 = $maoDev1Dir; if ($build === 'prod') { // Prod setup $syncDestinationDir1 = $maoProdTempDir; $syncDestinationDir2 = $maoProdDir; $maoReleaseEmail->to = $maoReleaseEmailRecipients; } $rsyncOptions1 = new RsyncOptions($maoWcTrunk->dir, $syncDestinationDir1); $rsyncOptions1->excludesAppend(array('/user_guide/', '/license.txt', 'application/logs/', '/dev/')); $rsyncOptions2 = new RsyncOptions($syncDestinationDir1, $syncDestinationDir2); $rsyncOptions2->useSsh(FALSE)->excludesAppend(array('/user_guide/', '/license.txt', 'application/logs/', '/dev/', '/application/config/production/routes.php')); // ******************************* // Start the build script // ******************************* Config::enableLogging(TRUE, TRUE); // ******************** // *** Initial output // Task::log("\n---------------------------------------\n"); Task::log("-------- Deploy Prod\n\n"); // Chicken quit if ($build === 'prod') { CliTask::promptQuit('Deploying to production! Continue? [y/n]: '); }
$workingCopy = $cogecoCaWorkingCopy; $revisionToCheckOut = 0; $sourceDb = $devDb; $destinationDb = $prodDbPublic; $syncDestinationDir1 = $preprodDir; $syncDestinationDir2 = $prodDir; $sourceDbSchema = 'cogecouat'; $destinationDbSchema = 'cogecouattest'; if ($build === 'prod') { // Prod setup $syncDestinationDir2 = $prodDir; $destinationDbSchema = 'cogeco'; $cogecoCaReleaseEmail->to = array('*****@*****.**'); } $rsyncOptions1 = new RsyncOptions($workingCopy->dir, $syncDestinationDir1); $rsyncOptions1->excludesAppend(array('/dev/')); $rsyncOptions2 = new RsyncOptions(new Dir($syncDestinationDir1->getPath()), new Dir($syncDestinationDir2->getPath())); $rsyncOptions2->useSsh(FALSE)->excludesAppend(array('/dev/')); // ******************************* // Start the build script // ******************************* // Config::enableLogging(TRUE, TRUE); // ******************** // *** Initial output // Task::log("\n---------------------------------------\n"); Task::log("-------- Deploy Prod\n\n"); // Chicken quit //if ($build === 'prod') { // CliTask::promptQuit('Deploying to production! Continue? [y/n]: ');