summaryrefslogtreecommitdiffstats
path: root/generate-stackbrew-library.sh
diff options
context:
space:
mode:
authorTilo Spannagel <development@tilosp.de>2018-10-01 17:29:15 +0200
committerTilo Spannagel <development@tilosp.de>2018-10-01 17:29:15 +0200
commit9aaa473e7d998b63b0319faa143cc3722f0f8664 (patch)
tree1440aad35dabb03701097c67f7db7faa7ec26c36 /generate-stackbrew-library.sh
parentefe4edb8eb34d104c5d685b1884246e78927b5a0 (diff)
Add some dummy hash for uncommited Dockerfiles
Signed-off-by: Tilo Spannagel <development@tilosp.de>
Diffstat (limited to 'generate-stackbrew-library.sh')
-rwxr-xr-xgenerate-stackbrew-library.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh
index 506eeda6..564ecf5d 100755
--- a/generate-stackbrew-library.sh
+++ b/generate-stackbrew-library.sh
@@ -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