Select Git revision
check_dns_responsetime
-
Hahn Axel (hahn) authoredHahn Axel (hahn) authored
act_build.php 9.61 KiB
<?php
/* ######################################################################
IML DEPLOYMENT
webgui - build a package
---------------------------------------------------------------------
2013-11-08 Axel <axel.hahn@iml.unibe.ch>
2014-02-14 Axel build was "ajaxified"
2014-11-14 Axel selector for branches
(...)
2024-09-20 Axel urlencode params in ajax call
###################################################################### */
require_once("./classes/project_gui.class.php");
require_once("./classes/formgen.class.php");
set_time_limit(0);
// --- Checks
$oPrj = new projectgui($aParams["prj"]);
$sOut = '';
// switch to a branch if it was selected
$sBranchname = '';
if (array_key_exists("branchname", $aParams)) {
$sBranchname = $aParams["branchname"];
$oPrj->setBranchname($aParams["branchname"]);
} else {
$sBranchname = $oPrj->getBranchname();
}
if (!array_key_exists("confirm", $aParams)) {
// ------------------------------------------------------------
// let the user click a button to make a new build
// ------------------------------------------------------------
$sNext = $oPrj->getNextPhase();
$aPhaseData2 = $oPrj->getPhaseInfos($sNext);
$sBranchontarget = isset($aPhaseData2["ready2install"]["branch"]) ? $aPhaseData2["ready2install"]["branch"] : '';
print_r($sBranchname);
$bIgnoreCache = isset($aParams['reloadBranches']) ? $aParams['reloadBranches'] : false;
// $sOut.='<p>Re-Read Branches (ignore caching) - '.($bIgnoreCache ? "JA" : "mein" ).'</p>';
$sOut .= '<p>' . sprintf(t("page-build-info"), $sNext, $sNext) . '</p>';
$sRevison = false;
$aRepodata = $oPrj->getRepoRevision(true);
if (isset($aRepodata["revision"])) {
$sRevison = $aRepodata["revision"];
if (
array_key_exists("revision", $aPhaseData2["onhold"]) && $aPhaseData2["onhold"]["revision"] == $sRevison
) {
$sOut .= $oHtml->getBox("warning", sprintf(t("page-build-warning-version-exists"), $sNext, $sRevison));
}
if (
array_key_exists("revision", $aPhaseData2["ready2install"]) && $aPhaseData2["ready2install"]["revision"] == $sRevison
) {
$sOut .= $oHtml->getBox("warning", sprintf(t("page-build-warning-version-is-installed"), $sNext, $sRevison));
}
}
$sOut .= '
<table>
<thead>
<tr>
<th class="versioncontrol" colspan="3">' . $oHtml->getIcon('repository') . t("versioncontrol") . '<br></th>
<th> </th>