flybywiresim / igniter

An intelligent task runner written in Typescript.
1 stars 4 forks source link

Add option to ExecTask to display build output #7

Open frankkopp opened 2 years ago

frankkopp commented 2 years ago

To make debugging of build script running in the igniter context and on github actions easier I propose adding an option to the ExecTask class which allows the build to show the output of this involved scripts.

This would usually only be used temporary and the general build should not have any additional noise once it works.

Example: new ExecTask('efb-translation', 'npm run build:efb-translation', true),

declare class GenericTask implements Task {
    key: string;
    private executor;
    private hashFolders;
    protected context: Context;
    protected errorOutput: string;
    protected showLogOutput: boolean;
    status: TaskStatus;

    /**
     * @param key The key of this generic task.
     * @param executor The TaskRunner used to run this task.
     * @param hashFolders Folders used to create caching hash.
     */
    constructor(key: string, executor: TaskRunner, showLogOutput?, hashFolders?: string[]);

...

Discord: Cdr_Maverick#6475

tracernz commented 2 years ago

Would be better to add a -v flag to igniter so you don't need to edit and configs. -v might do stderr only, and -vv stdout as well, as is convention for some other common build systems.

frankkopp commented 2 years ago

Would be better to add a -v flag to igniter so you don't need to edit and configs. -v might do stderr only, and -vv stdout as well, as is convention for some other common build systems.

That works as well of course. Just wanted it to be more more selective and per task so it is easier to find during github-actions for examples.

tracernz commented 2 years ago

Maybe -v optionally specifying a task after it?