When starting a manual build, replace the "Manual" commit id with the HEAD hash.
Close #928
This commit is contained in:
parent
3c7cddcc1c
commit
3427252cfe
3 changed files with 11 additions and 9 deletions
|
|
@ -124,16 +124,16 @@ class RemoteGitBuild extends Build
|
|||
$success = true;
|
||||
$commit = $this->getCommitId();
|
||||
|
||||
$chdir = IS_WIN ? 'cd /d "%s"' : 'cd "%s"';
|
||||
|
||||
if (!empty($commit) && $commit != 'Manual') {
|
||||
$cmd = 'cd "%s"';
|
||||
$cmd = $chdir . ' && git checkout %s --quiet';
|
||||
$success = $builder->executeCommand($cmd, $cloneTo, $commit);
|
||||
}
|
||||
|
||||
if (IS_WIN) {
|
||||
$cmd = 'cd /d "%s"';
|
||||
}
|
||||
|
||||
$cmd .= ' && git checkout %s --quiet';
|
||||
|
||||
$success = $builder->executeCommand($cmd, $cloneTo, $this->getCommitId());
|
||||
// Always update the commit hash with the actual HEAD hash
|
||||
if ($builder->executeCommand($chdir . ' && git rev-parse HEAD', $cloneTo)) {
|
||||
$this->setCommitId(trim($builder->getLastOutput()));
|
||||
}
|
||||
|
||||
return $success;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue