Skip to content

Commit

Permalink
Move command to run extract of script from README.md into a helper sc…
Browse files Browse the repository at this point in the history
…ript

That would simplify its execution by users/CI
  • Loading branch information
yarikoptic committed Jun 5, 2024
1 parent c17d41a commit bb5cf00
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
uses: actions/checkout@v4

- name: Test example in the README.md
run: bash <(sed -n -e '/^ *#!/,/^```$/p' README.md | grep -v '```')
run: scripts/run-README-example
9 changes: 9 additions & 0 deletions scripts/run-README-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
#
# A helper to assist with running the example embedded in README.md
#
set -eu -o pipefail

cd "$(dirname "$0")/.."

bash <(sed -n -e '/^ *#!/,/^```$/p' README.md | grep -v '```')

0 comments on commit bb5cf00

Please sign in to comment.