Allow to run commands one after another
This can be done with https://github.com/EngincanV/jonturk-cli/issues/1, by defining the pipeline in the generated script. Or as an alternative, we can introduce a new command to chain commands one after another or update the existing save command:
For example:
jonturk save -n name1 -c "my-command" --chains "my-command-2" "mycommand-3"
Then, whenever we want to run the name1 command, CLI asks if we want to run all commands in the chain (or a parameter can be passed such as --run-all) or only run the main command:
jonturk run -n name1 --run-all
-c and --chains stands for the same purpose,
Instead of different parameters how about defining a single array property in command class?
[CommandOption("commands", 'c')]
public string[] Commands { get; set; } = Array.Empty<string>();
Then usage:
jonturk save -n name1 -c "my-command" "my-command-2" "mycommand-3"
They can be chained according to array order.
Also, there can be an option in the Run Command for sequentially running and parallel running.
# Runs all commands parallel
jonturk run -n name1 --run-parallel
# Runs all commands sequentially chained.
jonturk run -n name1 --run-chained
# Also this can be default behavior without parameter:
jonturk run -n name1
-cand--chainsstands for the same purpose, Instead of different parameters how about defining a single array property in command class?[CommandOption("commands", 'c')] public string[] Commands { get; set; } = Array.Empty<string>();
This makes more sense 👍
Also, there can be an option in the Run Command for sequentially running and parallel running.
# Runs all commands parallel jonturk run -n name1 --run-parallel# Runs all commands sequentially chained. jonturk run -n name1 --run-chained # Also this can be default behavior without parameter: jonturk run -n name1
I have also considered these three options, the first and second one seems really helpful and I'll implement them. But for the third one, I'm not sure, because when I first created the issue, I imagined the chained commands as optional commands but I'll also consider that, it might be even better to make its default behavior and pass an option to just run the main one (such as --run-only-main).