Skip to content
Snippets Groups Projects
Commit 7186d908 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'task-3474-log-last-command' into 'master'

Task 3474 log last command

See merge request !103
parents 68cc3286 d5a31b1d
No related branches found
No related tags found
No related merge requests found
......@@ -1621,10 +1621,11 @@ class project extends base {
$sReturn.=$this->_execAndSend("ls -lisa $sTempBuildDir");
if (!$this->_iRcAll == 0) {
$this->_TempDelete($sTempBuildDir);
$sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir) . $sReturn;
$sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir);
$this->_logaction($sError, __FUNCTION__, "error");
return $this->_oHtml->getBox("error", $sError);
$this->_TempFill($sError.$sReturn, $aActionList);
$this->_TempDelete($sTempBuildDir);
return $this->_oHtml->getBox("error", $sError.$sReturn);
}
// --------------------------------------------------
......@@ -1661,6 +1662,7 @@ class project extends base {
if (!$this->_iRcAll == 0) {
$sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir);
$this->_logaction($sError, __FUNCTION__, "error");
$this->_TempFill($sError.$sReturn, $aActionList);
$this->_TempDelete($sTempBuildDir);
return $this->_oHtml->getBox("error", $sError . $sReturn);
}
......@@ -1695,10 +1697,11 @@ class project extends base {
// $this->_iRcAll = 0;
$sReturn.=$this->_execAndSend('bash --login -c \'' . $sSetEnv.' '.$sTempBuildDir . '/' . $sHookfile . '\'');
if (!$this->_iRcAll == 0) {
$this->_TempDelete($sTempBuildDir);
$sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir) . $sReturn;
$sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir);
$this->_logaction($sError, __FUNCTION__, "error");
return $this->_oHtml->getBox("error", $sError);
$this->_TempFill($sError.$sReturn, $aActionList);
$this->_TempDelete($sTempBuildDir);
return $this->_oHtml->getBox("error", $sError . $sReturn);
}
} else {
$sReturn.=t('skip') . '<br>';
......@@ -1740,17 +1743,19 @@ class project extends base {
}
if (!$sWebroot) {
$this->_TempDelete($sTempBuildDir);
$sError = t('class-project-error-build-docroot-not-found');
$this->_logaction($sError, __FUNCTION__, "error");
$this->_TempFill($sError.$sReturn, $aActionList);
$this->_TempDelete($sTempBuildDir);
return $this->_oHtml->getBox("error", $sError . $sReturn . $sError);
}
}
if (!$this->_iRcAll == 0) {
$this->_TempDelete($sTempBuildDir);
$sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir) . $sReturn;
$sError = sprintf(t('class-project-error-command-failed'), $sTempBuildDir);
$this->_logaction($sError, __FUNCTION__, "error");
return $this->_oHtml->getBox("error", $sError);
$this->_TempFill($sError.$sReturn, $aActionList);
$this->_TempDelete($sTempBuildDir);
return $this->_oHtml->getBox("error", $sError . $sReturn);
}
// $sReturn.=$this->_oHtml->getBox("success", "preparations ok - directory is ready for packaging now.");
// generate info file
......@@ -1795,9 +1800,11 @@ class project extends base {
}
$sReturn.=$this->_execAndSend("ls -ld " . dirname($sPackageFileArchiv));
if (!file_exists(dirname($sPackageFileArchiv))) {
$this->_TempDelete($sTempBuildDir);
$sError = sprintf(t('"class-project-error-build-dir-was-not-created"'), $sTempBuildDir);
$this->_logaction($sError, __FUNCTION__, "error");
$this->_TempFill($sError.$sReturn, $aActionList);
$this->_TempDelete($sTempBuildDir);
return $this->_oHtml->getBox("error", $sError . $sReturn);
}
$this->_TempFill($sReturn, $aActionList);
......@@ -1828,9 +1835,10 @@ class project extends base {
// TEST
// $this->_iRcAll=1;
if (!$this->_iRcAll == 0) {
$this->_TempDelete($sTempBuildDir);
$sError = t('class-project-error-build-packaging-failed');
$this->_logaction($sError, __FUNCTION__, "error");
$this->_TempFill($sError.$sReturn, $aActionList);
$this->_TempDelete($sTempBuildDir);
return $this->_oHtml->getBox("error", $sError . $sReturn);
}
$aActionList['iActive'] ++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment