-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/v3-update-command' into develop
- Loading branch information
Showing
4 changed files
with
79 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
|
||
class UpdateLorekeeperV3 extends Command { | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'update-lorekeeper-v3'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Runs commands to update Lorekeeper to version 3.0 from version 2.'; | ||
|
||
/** | ||
* Create a new command instance. | ||
*/ | ||
public function __construct() { | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return int | ||
*/ | ||
public function handle() { | ||
$this->info('**************************'); | ||
$this->info('* UPDATE LOREKEEPER (V3) *'); | ||
$this->info('**************************'."\n"); | ||
|
||
// Check if the user has run composer | ||
$this->info('This command should be run after installing packages using composer.'); | ||
if ($this->confirm('Have you run the composer install command or equivalent?')) { | ||
// Migrate | ||
$this->line('Running migrations...'); | ||
$this->call('migrate'); | ||
|
||
// Clear caches | ||
$this->line("\n".'Clearing caches...'); | ||
$this->call('optimize'); | ||
$this->call('view:clear'); | ||
$this->call('route:clear'); | ||
|
||
// Run miscellaneous commands | ||
$this->line("\n".'Updating site pages and settings...'); | ||
$this->call('add-site-settings'); | ||
$this->call('add-text-pages'); | ||
|
||
$this->line("\n".'Updating character images...'); | ||
$this->call('app:fill-character-fullsize-extensions'); | ||
|
||
$this->line("\n".'Updating released items...'); | ||
$this->call('update-released-items'); | ||
|
||
$this->line("\n".'Updating comments...'); | ||
$this->call('update-comment-types'); | ||
} else { | ||
$this->line('Aborting! Please run composer update and then run this command again.'); | ||
} | ||
} | ||
} |