fixed file mirror check
This commit is contained in:
parent
745078f403
commit
768b838015
@ -40,10 +40,21 @@ class FinishUpdate extends Command
|
||||
|
||||
$this->info('Finishing update...');
|
||||
|
||||
session(['company_id' => $this->argument('company_id')]);
|
||||
|
||||
$this->call('cache:clear');
|
||||
|
||||
event(new UpdateFinished($this->argument('alias'), $this->argument('new'), $this->argument('old')));
|
||||
$alias = $this->argument('alias');
|
||||
$company_id = $this->argument('company_id');
|
||||
$new = $this->argument('new');
|
||||
$old = $this->argument('old');
|
||||
|
||||
// Check if file mirror was successful
|
||||
$version = ($alias == 'core') ? version('short') : module($alias)->get('version');
|
||||
if ($version != $new) {
|
||||
throw new \Exception(trans('modules.errors.finish', ['module' => $alias]));
|
||||
}
|
||||
|
||||
session(['company_id' => $company_id]);
|
||||
|
||||
event(new UpdateFinished($alias, $new, $old));
|
||||
}
|
||||
}
|
||||
|
@ -125,11 +125,6 @@ class Updater
|
||||
|
||||
public static function finish($alias, $new, $old)
|
||||
{
|
||||
// Check if the file mirror was successful
|
||||
if (($alias == 'core') && (version('short') != $new)) {
|
||||
throw new \Exception(trans('modules.errors.finish', ['module' => $alias]));
|
||||
}
|
||||
|
||||
$company_id = session('company_id');
|
||||
|
||||
$command = "php artisan update:finish {$alias} {$company_id} {$new} {$old}";
|
||||
|
Loading…
x
Reference in New Issue
Block a user