Skip to content

Commit cb11a6b

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 347a871 commit cb11a6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generate-stackbrew-library.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ url='git://github.com/docker-library/python'
1616
echo '# maintainer: InfoSiftr <github@infosiftr.com> (@infosiftr)'
1717

1818
for version in "${versions[@]}"; do
19-
commit="$(git log -1 --format='format:%H' -- "$version")"
19+
commit="$(cd "$version" && git log -1 --format='format:%H' -- Dockerfile $(awk 'toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile))"
2020
fullVersion="$(grep -m1 'ENV PYTHON_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)"
2121

2222
versionAliases=()
@@ -33,7 +33,7 @@ for version in "${versions[@]}"; do
3333

3434
for variant in onbuild slim wheezy; do
3535
[ -f "$version/$variant/Dockerfile" ] || continue
36-
commit="$(git log -1 --format='format:%H' -- "$version/$variant")"
36+
commit="$(cd "$version/$variant" && git log -1 --format='format:%H' -- Dockerfile $(awk 'toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile))"
3737
echo
3838
for va in "${versionAliases[@]}"; do
3939
if [ "$va" = 'latest' ]; then

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy