Skip to content

Commit

Permalink
Updated installer to initialite version correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vassyli committed Apr 13, 2019
1 parent 29bb21f commit 3d527a8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions daenerys-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function get_cli_options(array $argv, int $start = 2)
{
"name": "local/test",
"require": {
"lotgd/crate-html": "dev-master"
"lotgd/crate-html": ">=0.5.3"
},
"license": "AGPL3",
"authors": [
Expand All @@ -185,7 +185,7 @@ function get_cli_options(array $argv, int $start = 2)
JSON;


out("Daenerys installer, version 0.5.0");
out("Daenerys installer, version 0.5.3");

if($argc < 2) {
out(<<<MSG
Expand Down Expand Up @@ -231,7 +231,7 @@ function get_cli_options(array $argv, int $start = 2)
out("Installation of daenerys");

// @ToDo: Let the user set some options here.
$minVersion = "0.5.0-alpha";
$minVersion = "0.5.1";

file_put_contents("composer.json", $composer);

Expand All @@ -252,17 +252,21 @@ function get_cli_options(array $argv, int $start = 2)

# Initialise database
`vendor/bin/daenerys database:init`;
`vendor/bin/daenerys crate:role:add ROLE_SUPERUSER`;

if (!isset($argOptions["nointeraction"])) {
$name = readline("Admin account name [admin]: ") ?: "admin";
$password = readline("Password [changeme]: ") ?: "changeme";
$email = readline("Email address for login [[email protected]]: ") ?: "[email protected]";

`vendor/bin/daenerys crate:user:add --username="$name" --password="$password" --email="$email"`;
`vendor/bin/daenerys crate:user:add "$name" "$email" "$password"`;
} else {
`vendor/bin/daenerys crate:user:add --username="admin" --password="changeme" --email="[email protected]"`;
$name = "admin";
`vendor/bin/daenerys crate:user:add admin "[email protected]" changeme`;
}

`vendor/bin/daenerys crate:role:grant ROLE_SUPERUSER $name`;

# Install assets
`cp vendor/lotgd/crate-html/public/css/* css`;
`cp vendor/lotgd/crate-html/public/icons/* icons`;
Expand Down

0 comments on commit 3d527a8

Please sign in to comment.