Remove local notes support
This commit is contained in:
parent
a2966da395
commit
7b00768f3a
|
|
@ -29,11 +29,6 @@ class UpdateManager
|
|||
{
|
||||
use \October\Rain\Support\Traits\Singleton;
|
||||
|
||||
/**
|
||||
* @var array The notes for the current operation.
|
||||
*/
|
||||
protected $notes = [];
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Console\OutputStyle
|
||||
*/
|
||||
|
|
@ -347,11 +342,11 @@ class UpdateManager
|
|||
/*
|
||||
* Rollback modules
|
||||
*/
|
||||
while (true) {
|
||||
if (isset($this->notesOutput)) {
|
||||
$this->migrator->setOutput($this->notesOutput);
|
||||
}
|
||||
|
||||
while (true) {
|
||||
$rolledBack = $this->migrator->rollback($paths, ['pretend' => false]);
|
||||
|
||||
if (count($rolledBack) == 0) {
|
||||
|
|
@ -405,12 +400,12 @@ class UpdateManager
|
|||
*/
|
||||
public function migrateModule($module)
|
||||
{
|
||||
$this->note($module);
|
||||
|
||||
if (isset($this->notesOutput)) {
|
||||
$this->migrator->setOutput($this->notesOutput);
|
||||
}
|
||||
|
||||
$this->note($module);
|
||||
|
||||
$this->migrator->run(base_path() . '/modules/'.strtolower($module).'/database/migrations');
|
||||
|
||||
return $this;
|
||||
|
|
@ -520,13 +515,9 @@ class UpdateManager
|
|||
|
||||
$this->note($name);
|
||||
|
||||
$this->versionManager->resetNotes()->setNotesOutput($this->notesOutput);
|
||||
$this->versionManager->setNotesOutput($this->notesOutput);
|
||||
|
||||
if ($this->versionManager->updatePlugin($plugin) !== false) {
|
||||
foreach ($this->versionManager->getNotes() as $note) {
|
||||
$this->note($note);
|
||||
}
|
||||
}
|
||||
$this->versionManager->updatePlugin($plugin);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
@ -797,31 +788,6 @@ class UpdateManager
|
|||
if ($this->notesOutput !== null) {
|
||||
$this->notesOutput->writeln($message);
|
||||
}
|
||||
else {
|
||||
$this->notes[] = $message;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notes for the last operation.
|
||||
* @return array
|
||||
*/
|
||||
public function getNotes()
|
||||
{
|
||||
return $this->notes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the notes store.
|
||||
* @return self
|
||||
*/
|
||||
public function resetNotes()
|
||||
{
|
||||
$this->notesOutput = null;
|
||||
|
||||
$this->notes = [];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,12 +29,6 @@ class VersionManager
|
|||
const HISTORY_TYPE_COMMENT = 'comment';
|
||||
const HISTORY_TYPE_SCRIPT = 'script';
|
||||
|
||||
/**
|
||||
* The notes for the current operation.
|
||||
* @var array
|
||||
*/
|
||||
protected $notes = [];
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Console\OutputStyle
|
||||
*/
|
||||
|
|
@ -412,6 +406,7 @@ class VersionManager
|
|||
* Execute the database PHP script
|
||||
*/
|
||||
$updateFile = $this->pluginManager->getPluginPath($code) . '/updates/' . $script;
|
||||
|
||||
$this->updater->packDown($updateFile);
|
||||
|
||||
Db::table('system_plugin_history')
|
||||
|
|
@ -481,31 +476,6 @@ class VersionManager
|
|||
if ($this->notesOutput !== null) {
|
||||
$this->notesOutput->writeln($message);
|
||||
}
|
||||
else {
|
||||
$this->notes[] = $message;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notes for the last operation.
|
||||
* @return array
|
||||
*/
|
||||
public function getNotes()
|
||||
{
|
||||
return $this->notes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the notes store.
|
||||
* @return self
|
||||
*/
|
||||
public function resetNotes()
|
||||
{
|
||||
$this->notesOutput = null;
|
||||
|
||||
$this->notes = [];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
@ -523,8 +493,7 @@ class VersionManager
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $details
|
||||
*
|
||||
* Extract script and comments from version details
|
||||
* @return array
|
||||
*/
|
||||
protected function extractScriptsAndComments($details)
|
||||
|
|
@ -539,7 +508,8 @@ class VersionManager
|
|||
$scripts = array_values(array_filter($details, function ($detail) use ($fileNamePattern) {
|
||||
return preg_match($fileNamePattern, $detail);
|
||||
}));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$comments = (array)$details;
|
||||
$scripts = [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue