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 committed 2015-08-11 15:12:18 -07:00
1 parent e53ff2df36
commit efd0dcbf38
1 file changed
+1 -1
+1 -1
View File
@@ -15,7 +15,7 @@ url='git://github.com/docker-library/haproxy'
echo '# maintainer: InfoSiftr <github@infosiftr.com> (@infosiftr)'
for version in "${versions[@]}"; do
commit="$(git log -1 --format='format:%H' -- "$version")"
commit="$(cd "$version" && git log -1 --format='format:%H' -- Dockerfile $(awk 'toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile))"
fullVersion="$(grep -m1 'ENV HAPROXY_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)"
versionAliases=( $fullVersion $version ${aliases[$version]} )