Skip to content

feat: Allow commands to RUN other commands#63

Merged
TekWizely merged 2 commits intomasterfrom
feat/cmd-run-cmd
Nov 27, 2022
Merged

feat: Allow commands to RUN other commands#63
TekWizely merged 2 commits intomasterfrom
feat/cmd-run-cmd

Conversation

@TekWizely
Copy link
Owner

@TekWizely TekWizely commented Nov 27, 2022

Adds Support for the following cmd options:

  • RUN
  • RUN.BEFORE
  • RUN.AFTER

RUN is the same as RUN.BEFORE, running before your command is executed.

  • Your command only runs if all before commands return exit code zero (0)

RUN.AFTER, as expected, runs after your command has finished executing

  • After commands only run if your command returns exit code zero (0)

Execution halts if any RUN returns a non-zero exit code

Your command's environment variables are exported to the invoked command

usage:

# RUN <cmd> [arg] [arg] ...

Any standard variable assignment values can be used as arguments

  • quoted strings, variable references, etc

chore: Runfile now stores []CmdProvider instead of []*RunCmd

  • Can re-generate RunCmd in different env contexts

chore: Adds new meta token TokenNotNewline

  • Generally indicates non-whitespace content available

bug: Sets config.CurrentRunfile for Primary runfile


TODO:

  • Update Docs

Relates to #12

cc: @CircleCode

Adds Support for cmd options:
 * RUN
 * RUN.BEFORE
 * RUN.AFTER

RUN is the same as RUN.BEFORE, running *before* your command is executed.
 - Your command only runs if all before commands return exit code zero (0)

RUN.AFTER, as expected, runs *after* your command has finished executing
 - After commands only runs if your command returns exit code zero (0)

Execution halts if any RUN returns a non-zero exit code

Your command's environment variables are exported to the invoked command

usage:

    # RUN <cmd> [arg] [arg] ...

Any standard variable assignment values can be used as arguments
 - quoted strings, variable references, etc

chore: Runfile now stores []CmdProvider instead of []*RunCmd
 - Can re-generate RunCmd in different env contexts

chore: Adds new meta token TokenNotNewline
 - Generally indicates non-whitespace content available

bug: Sets config.CurrentRunfile for Primary runfile
@TekWizely TekWizely merged commit 7200531 into master Nov 27, 2022
@TekWizely TekWizely deleted the feat/cmd-run-cmd branch November 27, 2022 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant