mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-27 22:47:23 +08:00
update command nexus:update
This commit is contained in:
@@ -82,6 +82,14 @@ class NexusUpdate extends Command
|
|||||||
}
|
}
|
||||||
$this->doLog("Specific tag: '$tag', download from '$url' and extra code, includes: " . implode(', ', $includes));
|
$this->doLog("Specific tag: '$tag', download from '$url' and extra code, includes: " . implode(', ', $includes));
|
||||||
$tmpPath = $this->update->downAndExtractCode($url, $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) {
|
if ($includeComposer) {
|
||||||
$requireCommand = 'composer';
|
$requireCommand = 'composer';
|
||||||
@@ -151,15 +159,6 @@ class NexusUpdate extends Command
|
|||||||
|
|
||||||
$this->doLog("All done!");
|
$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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user