-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from simde-utc/develop
Ajout de la migration de l'ancien vers le nouveau Portail et mise à jour
- Loading branch information
Showing
28 changed files
with
13,641 additions
and
92 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* Fichier générant la commande quick:clear. | ||
* Fichier générant la commande portail:clear. | ||
* Efface le cache de l'application. | ||
* | ||
* @author Alexandre Brasseur <[email protected]> | ||
|
@@ -19,7 +19,7 @@ class Clear extends Command | |
/** | ||
* @var string | ||
*/ | ||
protected $signature = 'quick:clear'; | ||
protected $signature = 'portail:clear'; | ||
|
||
/** | ||
* @var string | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/** | ||
* Fichier générant la commande quick:install. | ||
* Fichier générant la commande portail:install. | ||
* Installe l'application. | ||
* | ||
* @author Alexandre Brasseur <[email protected]> | ||
|
@@ -20,7 +20,7 @@ class Install extends Command | |
/** | ||
* @var string | ||
*/ | ||
protected $signature = 'quick:install'; | ||
protected $signature = 'portail:install'; | ||
|
||
/** | ||
* @var string | ||
|
@@ -59,16 +59,16 @@ public function handle() | |
$bar = $this->output->createProgressBar(9); | ||
$bar->advance(); | ||
|
||
$this->info(' [Quick Install] Preparation'); | ||
$this->info(' [Quick Install] Preparation - Portail'); | ||
$this->info(' [Portail Install] Préparation'); | ||
$this->info(' [Portail Install] Préparation - Portail'); | ||
$subBar = $this->output->createProgressBar(14); | ||
$subBar->advance(); | ||
$editEnv = true; | ||
|
||
if (file_exists('.env')) { | ||
$this->info(' /!\ An .env file already exists /!\\ '); | ||
$this->info(' /!\ Le fichier .env existe déjà /!\\ '); | ||
|
||
if ($this->confirm('Edit over it ?')) { | ||
if ($this->confirm('Le remplacer (ancienne version déplacée en .env.last) ?')) { | ||
shell_exec('cp .env .env.last'); | ||
} else { | ||
$editEnv = false; | ||
|
@@ -84,48 +84,51 @@ public function handle() | |
$bar->advance(); | ||
|
||
// Installation. | ||
$this->info(' [Quick Install] Installing Composer dependencies'); | ||
$this->info(' [Portail Install] Installation des dépendances Composer'); | ||
shell_exec('composer install'); | ||
$bar->advance(); | ||
|
||
// Configuration. | ||
$this->info(' [Quick Install] Setting keys'); | ||
$this->info(' [Portail Install] Définition des clés'); | ||
$this->call('key:generate'); | ||
$this->call('passport:keys'); | ||
$bar->advance(); | ||
|
||
$this->info(' [Quick Install] Installing Node dependencies'); | ||
$this->info(' [Portail Install] Installation des dépendances NodeJS'); | ||
shell_exec('npm install'); | ||
shell_exec('npm run dev'); | ||
$bar->advance(); | ||
|
||
// Migration. | ||
$this->info(' [Quick Install] Migrating'); | ||
if ($this->confirm('Erase the database ?')) { | ||
$this->info(' [Portail Install] Migration'); | ||
if ($this->confirm('Supprimer la base de données ?')) { | ||
$this->call('migrate:fresh'); | ||
} else { | ||
$this->call('migrate'); | ||
} | ||
|
||
if ($this->confirm('Seed the database ?')) { | ||
if ($this->confirm('Remplir la base de données ?')) { | ||
$this->call("db:seed"); | ||
|
||
if (config('app.env') === 'production' && $this->confirm('Ajouter les données de l\'ancien Portail ?')) { | ||
$this->call("portail:old-to-new"); | ||
} | ||
} | ||
|
||
$bar->advance(); | ||
|
||
// Effacement. | ||
$this->info(' [Quick Install] Cleaning'); | ||
$this->call('quick:clear'); | ||
$this->info(' [Portail Install] Nettoyage'); | ||
$this->call('portail:clear'); | ||
$bar->advance(); | ||
|
||
// Optimisation. | ||
$this->info(' [Quick Install] Optimizing'); | ||
$this->call('quick:optimize'); | ||
$this->info(' [Portail Install] Optimisation'); | ||
$this->call('portail:optimize'); | ||
$bar->advance(); | ||
|
||
// Fin. | ||
$bar->finish(); | ||
$this->info(' [Quick Install] Installation finished !'); | ||
$this->info(' [Portail Install] Installation finie !'); | ||
} | ||
|
||
/** | ||
|
@@ -161,7 +164,7 @@ private function editEnv(ProgressBar $bar, ProgressBar $subBar) | |
$this->changeEnv('GINGER_KEY', $value); | ||
$subBar->advance(); | ||
|
||
$this->info(' [Quick Install] Preparation - Database'); | ||
$this->info(' [Portail Install] Préparation - Base de données'); | ||
$subBar->advance(); | ||
|
||
$value = $this->choice('Type ?', ['mysql', 'pgsql', 'sqlite'], 'mysql'); | ||
|
Oops, something went wrong.