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:
parent
7fed4298db
commit
18220a2065
|
|
@ -15,7 +15,7 @@ url='git://github.com/docker-library/postgres'
|
||||||
echo '# maintainer: InfoSiftr <github@infosiftr.com> (@infosiftr)'
|
echo '# maintainer: InfoSiftr <github@infosiftr.com> (@infosiftr)'
|
||||||
|
|
||||||
for version in "${versions[@]}"; do
|
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 PG_VERSION ' "$version/Dockerfile" | cut -d' ' -f3 | cut -d- -f1 | sed 's/~/-/g')"
|
fullVersion="$(grep -m1 'ENV PG_VERSION ' "$version/Dockerfile" | cut -d' ' -f3 | cut -d- -f1 | sed 's/~/-/g')"
|
||||||
versionAliases=( $fullVersion $version ${aliases[$version]} )
|
versionAliases=( $fullVersion $version ${aliases[$version]} )
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue