Add some dummy hash for uncommited Dockerfiles

Signed-off-by: Tilo Spannagel <development@tilosp.de>
This commit is contained in:
Tilo Spannagel 2018-10-01 17:29:15 +02:00
parent efe4edb8eb
commit 9aaa473e7d
No known key found for this signature in database
GPG Key ID: E517E9F206B8993D

View File

@ -11,7 +11,13 @@ cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
# Get the most recent commit which modified any of "$@".
fileCommit() {
git log -1 --format='format:%H' HEAD -- "$@"
commit="$(git log -1 --format='format:%H' HEAD -- "$@")"
if [ -z "$commit" ]; then
# return some valid sha1 hash to make bashbrew happy
echo '0000000000000000000000000000000000000000'
else
echo "$commit"
fi
}
# Get the most recent commit which modified "$1/Dockerfile" or any file that