support of change beranch in updater
This commit is contained in:
parent
c59a28f259
commit
7a3bcbf086
|
@ -84,7 +84,7 @@ class UpdateSoftwareCommand extends Command
|
||||||
if ($this->isUpToDate()) {
|
if ($this->isUpToDate()) {
|
||||||
$this->writeOutput($output, '<info>The software is already up to date with the remote repository.</info>');
|
$this->writeOutput($output, '<info>The software is already up to date with the remote repository.</info>');
|
||||||
$this->logger->info('No update needed, software is up to date.');
|
$this->logger->info('No update needed, software is up to date.');
|
||||||
$state['log'] .= "No update needed, software is up to date.\n"; // اضافه کردن مستقیم به لاگ
|
$state['log'] .= "No update needed, software is up to date.\n";
|
||||||
$state['completedSteps'] = ['post_update_test'];
|
$state['completedSteps'] = ['post_update_test'];
|
||||||
$this->saveState($uuid, $state, $output, 'No update needed');
|
$this->saveState($uuid, $state, $output, 'No update needed');
|
||||||
$lock->release();
|
$lock->release();
|
||||||
|
@ -124,6 +124,10 @@ class UpdateSoftwareCommand extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!in_array('git_pull', $state['completedSteps'])) {
|
if (!in_array('git_pull', $state['completedSteps'])) {
|
||||||
|
$this->writeOutput($output, 'Setting up tracking for master branch...');
|
||||||
|
// تنظیم ردیابی شاخه master به origin/master
|
||||||
|
$this->runProcess(['git', 'branch', '--set-upstream-to=origin/master', 'master'], $this->rootDir, $output, 1);
|
||||||
|
|
||||||
$this->writeOutput($output, 'Pulling latest changes from GitHub...');
|
$this->writeOutput($output, 'Pulling latest changes from GitHub...');
|
||||||
$gitHeadBefore = $this->getCurrentGitHead();
|
$gitHeadBefore = $this->getCurrentGitHead();
|
||||||
$this->runProcess(['git', 'pull'], $this->rootDir, $output, 3);
|
$this->runProcess(['git', 'pull'], $this->rootDir, $output, 3);
|
||||||
|
|
Loading…
Reference in a new issue