mirror of
https://github.com/docker-library/ruby.git
synced 2022-11-09 11:41:34 -05: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
7cc4eaa8d4
commit
9e9d643c2c
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ url='git://github.com/docker-library/ruby'
|
|||
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 RUBY_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)"
|
||||
|
||||
versionAliases=()
|
||||
|
@ -31,7 +31,7 @@ for version in "${versions[@]}"; do
|
|||
done
|
||||
|
||||
for variant in onbuild slim; 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…
Add table
Reference in a new issue