Skip to content
Snippets Groups Projects
Commit 281acd17 authored by Axel Hahn's avatar Axel Hahn
Browse files

- added: deploy tags

- changed: slect branch is a dropdown (instead of radio list)
- fixed: show stderr on commands
- added stderr outpu on git commands
parent 376c8168
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment