Update composer; fix environment setting
This commit is contained in:
parent
96592e2875
commit
4a7fdaedde
2 changed files with 12 additions and 5 deletions
|
@ -84,9 +84,12 @@ class UpdateEnvironment extends Command
|
||||||
|
|
||||||
$this->line('Writing new environment configuration to file.');
|
$this->line('Writing new environment configuration to file.');
|
||||||
foreach ($variables as $key => $value) {
|
foreach ($variables as $key => $value) {
|
||||||
$regex = '/^' . $key . '=(.*)$/m';
|
$newValue = $key . '=' . $value;
|
||||||
$replace = $key . '=' . $value;
|
if (preg_match_all('/^' . $key . '=(.*)$/m', $envContents) < 1) {
|
||||||
$envContents = preg_replace($regex, $replace, $envContents);
|
$envContents = $envContents . "\n" . $newValue;
|
||||||
|
} else {
|
||||||
|
$envContents = preg_replace('/^' . $key . '=(.*)$/m', $newValue, $envContents);
|
||||||
|
}
|
||||||
$bar->advance();
|
$bar->advance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,13 +74,17 @@
|
||||||
"sed -i.bak 's/homestead.app/pterodactyl.local/g' Homestead.yaml",
|
"sed -i.bak 's/homestead.app/pterodactyl.local/g' Homestead.yaml",
|
||||||
"rm Homestead.yaml.bak",
|
"rm Homestead.yaml.bak",
|
||||||
"php artisan key:generate",
|
"php artisan key:generate",
|
||||||
"php artisan pterodactyl:env"
|
"php artisan pterodactyl:env",
|
||||||
|
"php artisan migrate",
|
||||||
|
"php artisan pterodactyl:user"
|
||||||
],
|
],
|
||||||
"setup": [
|
"setup": [
|
||||||
"composer install --ansi --no-dev",
|
"composer install --ansi --no-dev",
|
||||||
"php -r \"copy('.env.example', '.env');\"",
|
"php -r \"copy('.env.example', '.env');\"",
|
||||||
"php artisan key:generate",
|
"php artisan key:generate",
|
||||||
"php artisan pterodactyl:env"
|
"php artisan pterodactyl:env",
|
||||||
|
"php artisan migrate",
|
||||||
|
"php artisan pterodactyl:user"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
|
Loading…
Reference in a new issue