mirror of
https://github.com/danog/php.git
synced 2024-11-27 04:14:56 +01:00
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
b1ff26c9e5
commit
757528222b
@ -16,7 +16,7 @@ url='git://github.com/docker-library/php'
|
||||
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 PHP_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)"
|
||||
versionAliases=( $fullVersion $version ${aliases[$version]} )
|
||||
|
||||
@ -34,7 +34,7 @@ for version in "${versions[@]}"; do
|
||||
done
|
||||
|
||||
for variant in apache fpm; do
|
||||
commit="$(git log -1 --format='format:%H' -- "$version/$variant")"
|
||||
commit="$(cd "$version/$variant" && git log -1 --format='format:%H' -- Dockerfile $(awk 'toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile))"
|
||||
echo
|
||||
for va in "${versionAliases[@]}"; do
|
||||
if [ "$va" = 'latest' ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user