コード例 #1
0
ファイル: deploy-prod.php プロジェクト: primat/deployer-org
Task::log("-------- Deploy Prod\n\n");
// Chicken quit
if ($build === 'prod') {
    CliTask::promptQuit('Deploying to production! Continue? [y/n]: ');
}
// Prompt for user password, if it's not hardcoded
CliTask::promptAccountPassword($cogecoAccount);
// ********************
// *** SVN checkout
//
SvnTask::checkoutClean($workingCopy, $revisionToCheckOut);
SvnTask::createManifestFile($workingCopy);
// ********************
// *** Validate build
//
$lastTagRevision = SvnTask::getLastTagRevision($maoTag);
Task::log("- Current revision: {$workingCopy->info->commitRevision}\n");
Task::log("- Last tag commit revision: {$lastTagRevision}\n");
if ($build === 'prod' && $workingCopy->info->commitRevision <= $lastTagRevision) {
    Task::log("The revision you want to tag is lower than or equal to the last tagged release revision\n");
    Task::log("Custom tags should be created manually\n\n");
    exit;
}
// ********************
// *** Prep notification email
//
$logEntries = SvnTask::getLogEntries($workingCopy, $lastTagRevision + 1, $workingCopy->info->commitRevision);
// Convert log entries into text and html
$changesText = ViewTask::getLogEntriesText($logEntries);
$changesHtml = ViewTask::getLogEntriesHtml($logEntries);
// Load the email templates with the changes