docs/tools/dead-link-linter
Danny Massa 69a58f0e3a Adding dead-link-linter gate
Change-Id: I8b4771ca46d76b005f26f1c1a45f5309263e9da7
2021-10-28 09:25:20 -05:00

26 lines
640 B
Bash
Executable File

#!/usr/bin/env bash
set -xe
: "${LINTER_VERSION:="1.0.3"}"
: "${OS_TYPE:="linux"}"
: "${ARCHITECTURE:="amd64"}"
URL="https://github.com/DannyMassa/dead-link-linter/releases/download/${LINTER_VERSION}/dead-link-linter-${LINTER_VERSION}-${OS_TYPE}-${ARCHITECTURE}.tar.gz"
TAR_BALL="dead-link-linter-${LINTER_VERSION}-${OS_TYPE}-${ARCHITECTURE}.tar.gz"
wget ${URL}
tar -xvf ${TAR_BALL}
./dead-link-linter
status=$?
[ $status -eq 0 ] && \
echo "Dead Link Linter Passed" && \
rm ${TAR_BALL} && \
rm dead-link-linter && \
exit 0 \
|| \
echo "Dead Link Linter Failed" && \
rm ${TAR_BALL} && \
rm dead-link-linter && \
exit 1