sonarcloud-github-action/test/assertFileContains

13 lines
No EOL
194 B
Bash
Executable file

#!/bin/bash
set -eo pipefail
error() { echo -e "\\e[31m✗ $*\\e[0m"; }
. ${BASH_SOURCE%/*}/assertFileExists $1
if ! grep -q $2 $1; then
error "'$2' not found in '$1'"
cat $1
exit 1
fi