Skip to content

Commit cefd45b

Browse files
committed
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
1 parent c402b76 commit cefd45b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate-stackbrew-library.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ url='git://github.com/docker-library/mysql'
1515
echo '# maintainer: InfoSiftr <[email protected]> (@infosiftr)'
1616

1717
for version in "${versions[@]}"; do
18-
commit="$(git log -1 --format='format:%H' -- "$version")"
18+
commit="$(cd "$version" && git log -1 --format='format:%H' -- Dockerfile $(awk 'toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile))"
1919
fullVersion="$(grep -m1 'ENV MYSQL_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)"
2020
versionAliases=()
2121
while [ "$fullVersion" != "$version" -a "${fullVersion%[.-]*}" != "$fullVersion" ]; do

0 commit comments

Comments
 (0)