Skip to content

Commit

Permalink
Merge pull request openshift#116 from russellb/hack-scripts
Browse files Browse the repository at this point in the history
Add hack/markdownlint.sh.
  • Loading branch information
metal3-io-bot authored Oct 9, 2019
2 parents 86c4639 + de74494 commit de24e11
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions hack/markdownlint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

set -eux

IS_CONTAINER=${IS_CONTAINER:-false}

if [ "${IS_CONTAINER}" != "false" ]; then
TOP_DIR="${1:-.}"
find "${TOP_DIR}" -path ./vendor -prune -o -name '*.md' -exec mdl --style all --warnings {} \+
else
podman run --rm \
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/workdir:ro,z" \
--entrypoint sh \
--workdir /workdir \
registry.hub.docker.com/pipelinecomponents/markdownlint:latest \
/workdir/hack/markdownlint.sh "${@}"
fi;

0 comments on commit de24e11

Please sign in to comment.