Build sources instead of 'Manual' word.
This commit is contained in:
parent
ca0f7b4182
commit
145670acde
25 changed files with 266 additions and 109 deletions
|
|
@ -137,18 +137,24 @@ class RemoteGitBuild extends Build
|
|||
*/
|
||||
protected function postCloneSetup(Builder $builder, $cloneTo, array $extra = null)
|
||||
{
|
||||
$success = true;
|
||||
$commit = $this->getCommitId();
|
||||
$chdir = 'cd "%s"';
|
||||
$success = true;
|
||||
$commitId = $this->getCommitId();
|
||||
$chdir = 'cd "%s"';
|
||||
|
||||
if (empty($this->getEnvironment()) && !empty($commit) && $commit != 'Manual') {
|
||||
$cmd = $chdir . ' && git checkout %s --quiet';
|
||||
$success = $builder->executeCommand($cmd, $cloneTo, $commit);
|
||||
if (empty($this->getEnvironment()) && !empty($commitId)) {
|
||||
$cmd = $chdir . ' && git checkout %s --quiet';
|
||||
$success = $builder->executeCommand($cmd, $cloneTo, $commitId);
|
||||
}
|
||||
|
||||
// Always update the commit hash with the actual HEAD hash
|
||||
if ($builder->executeCommand($chdir . ' && git rev-parse HEAD', $cloneTo)) {
|
||||
$this->setCommitId(trim($builder->getLastOutput()));
|
||||
$commitId = trim($builder->getLastOutput());
|
||||
|
||||
$this->setCommitId($commitId);
|
||||
|
||||
if ($builder->executeCommand($chdir . ' && git log -1 --pretty=format:%%s %s', $cloneTo, $commitId)) {
|
||||
$this->setCommitMessage(trim($builder->getLastOutput()));
|
||||
}
|
||||
}
|
||||
|
||||
return $success;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue