update command nexus:update

This commit is contained in:
xiaomlove
2022-11-26 03:25:30 +08:00
parent a52a593f00
commit 536f0dcb6e

View File

@@ -82,6 +82,14 @@ class NexusUpdate extends Command
}
$this->doLog("Specific tag: '$tag', download from '$url' and extra code, includes: " . implode(', ', $includes));
$tmpPath = $this->update->downAndExtractCode($url, $includes);
if (!$keepTmp) {
$this->doLog("Delete tmp files in: $tmpPath");
$this->update->executeCommand("rm -rf " . rtrim($tmpPath, '/'));
} else {
$this->doLog("Keep tmp files in: $tmpPath");
}
$this->doLog("Code update successfully, run this command without --tag option to run the upgrade please!", 'warn');
return 0;
}
if ($includeComposer) {
$requireCommand = 'composer';
@@ -151,15 +159,6 @@ class NexusUpdate extends Command
$this->doLog("All done!");
if (isset($tmpPath)) {
if (!$keepTmp) {
$this->doLog("Delete tmp files in: $tmpPath");
$this->update->executeCommand("rm -rf " . rtrim($tmpPath, '/'));
} else {
$this->doLog("Keep tmp files in: $tmpPath");
}
}
return 0;
}