mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Fixes for self-updater (#3313)
* Include Self-Update mailers * Fixes for self-update
This commit is contained in:
parent
be3ade65f1
commit
caa47d8662
65
app/Console/Commands/ArtisanUpgrade.php
Normal file
65
app/Console/Commands/ArtisanUpgrade.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
class ArtisanUpgrade extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'ninja:post-update';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Run basic upgrade commands';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
|
||||
exec("composer install");
|
||||
|
||||
try {
|
||||
|
||||
Artisan::call('migrate');
|
||||
|
||||
}catch(Exception $e) {
|
||||
|
||||
\Log::error("I wasn't able to migrate the data.");
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Artisan::call('optimize');
|
||||
|
||||
}catch(Exception $e) {
|
||||
|
||||
\Log::error("I wasn't able to optimize.");
|
||||
}
|
||||
|
||||
|
||||
\Log::error("finished upgrade post");
|
||||
}
|
||||
}
|
@ -120,7 +120,9 @@ return [
|
||||
//]
|
||||
],
|
||||
'post_update' => [
|
||||
|
||||
'postupdate:cleanup' => [
|
||||
'class' => \App\Console\Commands\ArtisanUpgrade::class,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
|
5
resources/views/vendor/self-update/mails/update-available.blade.php
vendored
Normal file
5
resources/views/vendor/self-update/mails/update-available.blade.php
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
Hello!
|
||||
|
||||
The new version {{ $newVersion }} is available.
|
||||
|
||||
Kind regards
|
0
resources/views/vendor/self-update/self-update.blade.php
vendored
Normal file
0
resources/views/vendor/self-update/self-update.blade.php
vendored
Normal file
Loading…
Reference in New Issue
Block a user