From 5ccbb4bf439418b5ded2e53ee1850677c2001f50 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 11 Aug 2015 15:12:26 -0700 Subject: [PATCH] Enhance "generate-stackbrew-library.sh" to only take into account changes to the Dockerfile or files from COPY in the Dockerfile for choosing the commit hash for a particular directory --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 1eec0df..c8cdeab 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,7 +3,7 @@ set -e cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" url='git://github.com/docker-library/julia' -commit=$(git log -1 --format="format:%H" -- Dockerfile) +commit="$(git log -1 --format='format:%H' -- Dockerfile $(awk 'toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile))" fullVersion="$(grep -m1 'ENV JULIA_VERSION' Dockerfile | cut -d' ' -f3)" version="${fullVersion%[.-]*}"