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

#438: CI-Server: beim Build alle Datein hooks/on* ausführbar machen

parent 86a95a06
Branches
No related tags found
No related merge requests found
<?php
require_once 'base.class.php';
/* ######################################################################
......@@ -1311,6 +1312,14 @@ class project extends base{
$this->_logaction($sError, __FUNCTION__, "error");
return $this->getBox("error", $sError);
}
// --------------------------------------------------
foreach (glob($sTempDir . '/hooks/on*') as $filename) {
$sReturn.='chmod 755 ' . $filename . '<br>';
$sReturn.=$this->_execAndSend('chmod 755 ' . $filename);
$sReturn.=$this->_execAndSend('ls -l ' . $filename);
}
$sReturn.=$this->getBox("success", t('class-project-info-build-checkout-ok'));
$aActionList['iActive'] ++;
$this->_TempFill($sReturn, $aActionList);
......@@ -1322,7 +1331,7 @@ class project extends base{
$sHookfile = $this->_aConfig['hooks']['build-postclone'];
$sReturn.='<h3>' . t('class-project-build-label-execute-hook-postclone') . ' (' . $sHookfile . ')</h3>';
if (file_exists($sTempDir . '/' . $sHookfile)) {
$sReturn.=$this->_execAndSend('chmod 755 ' . $sTempDir . '/hooks/on*');
// $sReturn.=$this->_execAndSend('chmod 755 ' . $sTempDir . '/hooks/on*');
// $this->_iRcAll = 0;
$sReturn.=$this->_execAndSend('bash --login -c \'' . $sTempDir . '/' . $sHookfile . '\'');
if (!$this->_iRcAll == 0) {
......@@ -1358,7 +1367,7 @@ class project extends base{
$sHookfile = $this->_aConfig['hooks']['build-precompress'];
$sReturn.='<h3>' . t('class-project-build-label-execute-hook-precompress') . ' (' . $sHookfile . ')</h3>';
if (file_exists($sTempDir . '/' . $sHookfile)) {
$sReturn.=$this->_execAndSend('chmod 755 ' . $sTempDir . '/hooks/on*');
// $sReturn.=$this->_execAndSend('chmod 755 ' . $sTempDir . '/hooks/on*');
// $this->_iRcAll = 0;
$sReturn.=$this->_execAndSend('bash --login -c \'' . $sTempDir . '/' . $sHookfile . '\'');
if (!$this->_iRcAll == 0) {
......@@ -2191,8 +2200,7 @@ class project extends base{
}
$sReturn.=' ' . $this->renderInfoLink(
$aData,
array(
$aData, array(
'title' => $this->getLabel() . " :: $sPhase :: $sPlace",
'more' => $sMore,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment