Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature release hotfixes #318

Merged
merged 8 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ After you installed doil the basic system is ready to go. To get an instance of
ILIAS running you simply need to do following steps:

1. Head to a folder where you want to store your project. Usually `~/Projects`
1. Enter following command: `doil create -n -e ilias7 -r ilias -b release_7 -p 7.4 -u`
1. Enter following command: `doil create -e ilias7 -r ilias -b release_7 -p 7.4 -u`

Don't worry, this will take a while. It creates and instance of ILIAS named `ilias7`
in your location from the repository `ilias` (see `doil repo:list`) with the known
Expand Down Expand Up @@ -255,7 +255,7 @@ via Dockers volumes and can be accessed from the host system.

### System

**doil** comes with some helpers which are usefull if you want to hack on **doil**:
**doil** comes with some helpers which are useful if you want to hack on **doil**:

* `doil system:uninstall` will remove doil from your system. users, instance and config remain
* `doil system:uninstall --prune` will remove doil completely from your system for all users
Expand Down Expand Up @@ -330,7 +330,7 @@ users, so make sure to understand what you are doing.
Option 1: An instance can be created with the '-x' flag, or alternatively
in interactive mode you will be asked to install xdebug.
On the command line it could look like this:
* `doil create -n -e ilias7 -r ilias -b release_7 -p 7.4 -u -x`
* `doil create -e ilias7 -r ilias -b release_7 -p 7.4 -u -x`

Option 2: You can apply a state to an already existing instance.
To activate xdebug use the following command:
Expand Down
2 changes: 1 addition & 1 deletion app/src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class App extends Application
{
const NAME = "Doil Version 20230308 - build 2023-03-08";
const NAME = "Doil Version 20230323 - build 2023-03-23";

public function __construct(Command ...$commands)
{
Expand Down
33 changes: 19 additions & 14 deletions app/src/Commands/Instances/ApplyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ class ApplyCommand extends Command
{
protected const PATH_STATES = "/usr/local/share/doil/stack/states";

protected static array $non_user_states = [
"autoinstall",
"base",
"composer",
"composer2",
"composer54",
"dev",
"ilias",
"mailservices",
"proxyservices",
"reactor",
"change-roundcube-password",
"nodejs"
];

protected static $defaultName = "instances:apply";
protected static $defaultDescription =
"Apply state for the given instance. This is useful for re-applying singular state to your instance.";
Expand Down Expand Up @@ -62,12 +77,7 @@ public function execute(InputInterface $input, OutputInterface $output) : int
throw new InvalidArgumentException("Not enough arguments (missing: \"instance\" or \"all\")");
}

if (
$state == "mailservices" ||
$state == "proxyservices" ||
$state == "reactor" ||
$state == "change-roundcube-password"
) {
if (in_array($state, self::$non_user_states)) {
$this->writer->error(
$output,
"State '$state' is not allowed!",
Expand Down Expand Up @@ -96,17 +106,12 @@ public function execute(InputInterface $input, OutputInterface $output) : int
if (is_null($state)) {
$states = $this->filesystem->getFilesInPath(self::PATH_STATES);

$states = array_filter($states, function ($s) {
if (
$s == "mailservices" ||
$s == "proxyservices" ||
$s == "reactor" ||
$s == "change-roundcube-password"
) {
$states = array_values(array_filter($states, function ($s) {
if (in_array($s, self::$non_user_states)) {
return false;
}
return true;
});
}));

$helper = $this->getHelper("question");
$question = new ChoiceQuestion(
Expand Down
Loading