-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds support to handle skipPrompts from MD files in the cli (#410)
- Loading branch information
Showing
6 changed files
with
183 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
skipPrompts: true | ||
--- | ||
|
||
```sh { name=skip-prompts-sample } | ||
$ export ENV="<insert-env-here>" | ||
$ echo "The content of ENV is ${ENV}" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
env SHELL=/bin/bash | ||
exec runme run --all --category=foo --filename=CATEGORIES.md | ||
cmp stdout foo-bar-list.txt | ||
! stderr . | ||
|
||
env SHELL=/bin/bash | ||
exec runme run --all --category=bar --filename=CATEGORIES.md | ||
cmp stdout bar-list.txt | ||
! stderr . | ||
|
||
-- CATEGORIES.md -- | ||
|
||
```bash { name=set-env category=foo } | ||
$ export ENV="foo!" | ||
``` | ||
|
||
```bash { name=print-foo category=foo } | ||
$ stty -opost | ||
$ echo "$ENV" | ||
``` | ||
|
||
```bash { name=print-bar category=foo,bar } | ||
$ stty -opost | ||
$ echo "bar!" | ||
``` | ||
|
||
```bash { name=excluded category=foo,bar excludeFromRunAll=true } | ||
$ stty -opost | ||
$ echo "excluded!" | ||
``` | ||
|
||
-- foo-bar-list.txt -- | ||
► Running task set-env... | ||
► ✓ Task set-env exited with code 0 | ||
► Running task print-foo... | ||
foo! | ||
► ✓ Task print-foo exited with code 0 | ||
► Running task print-bar... | ||
bar! | ||
► ✓ Task print-bar exited with code 0 | ||
-- bar-list.txt -- | ||
bar! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
env SHELL=/bin/bash | ||
exec runme run --all --filename=README.md | ||
cmp stdout all.txt | ||
! stderr . | ||
|
||
env SHELL=/bin/bash | ||
exec runme run foo-command | ||
cmp stdout skip.txt | ||
! stderr . | ||
|
||
-- all.txt -- | ||
► Running task set-env... | ||
► ✓ Task set-env exited with code 0 | ||
► Running task print-foo... | ||
foo! | ||
► ✓ Task print-foo exited with code 0 | ||
► Running task print-bar... | ||
bar! | ||
► ✓ Task print-bar exited with code 0 | ||
-- skip.txt -- | ||
foo-command | ||
-- README.md -- | ||
--- | ||
skipPrompts: true | ||
--- | ||
|
||
```bash { name=set-env category=foo interactive=true } | ||
$ export ENV="foo!" | ||
``` | ||
|
||
```bash { name=print-foo category=foo interactive=true } | ||
$ stty -opost | ||
$ echo "$ENV" | ||
``` | ||
|
||
```bash { name=print-bar category=foo,bar interactive=true } | ||
$ stty -opost | ||
$ echo "bar!" | ||
``` | ||
|
||
```bash { name=excluded category=foo,bar interactive=true excludeFromRunAll=true } | ||
$ stty -opost | ||
$ echo "excluded!" | ||
``` | ||
-- SKIP.md -- | ||
--- | ||
skipPrompts: true | ||
--- | ||
|
||
```sh { name=foo-command category=c1 interactive=true} | ||
$ stty -opost | ||
export BAR="foo-command" | ||
echo $BAR | ||
``` |