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

This commit is contained in:
Tianon Gravi 2015-08-11 15:12:26 -07:00
parent 951fefea3d
commit 5ccbb4bf43
1 changed files with 1 additions and 1 deletions

View File

@ -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%[.-]*}"