Skip to content

Commit

Permalink
Adding shellcheck + scripts changed to pass it
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Dec 31, 2019
1 parent 6306c46 commit db71e7e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 23 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/checks.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: shellcheck

on:
pull_request:
types: [opened, synchronize]
paths:
- '**.sh'

jobs:
shellcheck:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
2 changes: 1 addition & 1 deletion clean_all-k8s-full.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash -eu

sed -n '/^```bash.*/,/^```$/p' docs/part-10/README.md | sed '/^```*/d' | sh -x
sed -n "/^\`\`\`bash.*/,/^\`\`\`$/p" docs/part-10/README.md | sed '/^```*/d' | sh -x
11 changes: 6 additions & 5 deletions run-k8s-full.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -eu
# include the magic
################################################
test -s ./demo-magic.sh || curl --silent https://raw.githubusercontent.com/paxtonhare/demo-magic/master/demo-magic.sh > demo-magic.sh
# shellcheck disable=SC1091
. ./demo-magic.sh

################################################
Expand All @@ -15,7 +16,7 @@ test -s ./demo-magic.sh || curl --silent https://raw.githubusercontent.com/paxto
#
# speed at which to simulate typing. bigger num = faster
#
TYPE_SPEED=60
export TYPE_SPEED=60

# Uncomment to run non-interactively
export PROMPT_TIMEOUT=0
Expand All @@ -29,7 +30,7 @@ export NO_WAIT=true
# see http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html for escape sequences
#
#DEMO_PROMPT="${GREEN}➜ ${CYAN}\W "
DEMO_PROMPT="${GREEN}${CYAN}$ "
export DEMO_PROMPT="${GREEN}${CYAN}$ "

# hide the evidence
#clear
Expand All @@ -52,16 +53,16 @@ DEMO_PROMPT="${GREEN}➜ ${CYAN}$ "
sed docs/part-0{1..9}/README.md \
-e '/^## Configure AWS/,/^Create policy allowing the cert-manager to change Route 53 settings./d' \
| \
sed -n '/^```bash.*/,/^```$/p' \
sed -n "/^\`\`\`bash.*/,/^\`\`\`$/p" \
| \
sed \
-e 's/^```bash.*/\
pe '"'"'/' \
-e 's/^```bash.*/\npe '"'"'/' \
-e 's/^```$/'"'"'/' \
> README.sh


if [ "$#" -eq 0 ]; then
# shellcheck disable=SC1091
source README.sh
else
cat README.sh
Expand Down

0 comments on commit db71e7e

Please sign in to comment.