From 281acd1721d6e09e31ea17b25215434838b5dbcb Mon Sep 17 00:00:00 2001 From: Axel Hahn <axel.hahn@iml.unibe.ch> Date: Fri, 14 Nov 2014 10:05:11 +0100 Subject: [PATCH] - added: deploy tags - changed: slect branch is a dropdown (instead of radio list) - fixed: show stderr on commands - added stderr outpu on git commands --- public_html/deployment/classes/vcs.git.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public_html/deployment/classes/vcs.git.class.php b/public_html/deployment/classes/vcs.git.class.php index 5ea7864a..635d9da8 100644 --- a/public_html/deployment/classes/vcs.git.class.php +++ b/public_html/deployment/classes/vcs.git.class.php @@ -155,12 +155,12 @@ class vcs implements iVcs { if (!file_exists($this->_sTempDir . ".git")) { $sGitCmd.='mkdir "' . $this->_sTempDir . '" && cd "' . $this->_sTempDir . '" && '; $sGitCmd.='git init >/dev/null && '; - $sGitCmd.='git remote add origin "' . $this->getUrl() . '" && '; + $sGitCmd.='git remote add origin "' . $this->getUrl() . '" 2>&1 && '; } else { - $sGitCmd.='cd "' . $this->_sTempDir . '" && '; + $sGitCmd.='cd "' . $this->_sTempDir . '" 2>&1 && '; } // $sGitCmd.='git branch -r ; '; - $sGitCmd.='git ls-remote --heads origin; git ls-remote --tags origin'; + $sGitCmd.='git ls-remote --heads origin 2>&1 ; git ls-remote --tags origin 2>&1 '; exec($sGitCmd, $aOutput, $iRc); if ($iRc == 0) { foreach ($aOutput as $sBranch) { @@ -236,15 +236,15 @@ class vcs implements iVcs { } else { if (!file_exists($this->_sTempDir . ".git")) { $sGitCmd.='mkdir "' . $this->_sTempDir . '" && cd "' . $this->_sTempDir . '" && '; - $sGitCmd.='git init >/dev/null && '; - $sGitCmd.='git remote add origin "' . $this->getUrl() . '" && '; + $sGitCmd.='git init >/dev/null 2>&1 && '; + $sGitCmd.='git remote add origin "' . $this->getUrl() . '" 2>&1 && '; } else { $sGitCmd.='cd "' . $this->_sTempDir . '" && '; } $sGitCmd.='git fetch --update-head-ok --tags --depth 1 2>&1 && '; } - $sGitCmd.='git log -1 "' . $this->_sCurrentBranch . '" ; '; + $sGitCmd.='git log -1 "' . $this->_sCurrentBranch . '" 2>&1 ; '; $sLoginfo = shell_exec($sGitCmd); $sRevision = false; -- GitLab