treasuremap/tools/dead-link-linter
Danny Massa f9ae26105b Adding dead-link-linter gate
Change-Id: I3b97e42abf5084a6dbd46616327e7bfe7b1a9791
2021-11-17 13:16:38 -06: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