Skip to content

Commit 35dab1c

Browse files
committed
Update to use new "DockerFroms" (and "ArchLastStageFrom") function
See docker-library/official-images#5929
1 parent 635c357 commit 35dab1c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.template-helpers/generate-dockerfile-links-partial.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This template defines the "Supported tags and Dockerfile links" portion of an im
1515
{{- $arch := $archSpecific | ternary arch ($e.HasArchitecture arch | ternary arch ($e.Architectures | first)) -}}
1616

1717
{{- /* force bashbrew to "fetch" the GitCommit so that it is fully resolved */ -}}
18-
{{- $from := $.ArchDockerFrom $arch $e -}}
18+
{{- $froms := $.ArchDockerFroms $arch $e -}}
1919

2020
{{- $gitRepo := $e.ArchGitRepo $arch -}}
2121
{{- $repoUrlBase := $gitRepo | replace "git://" "https://" | trimSuffixes ".git" -}}
@@ -52,7 +52,7 @@ This template defines the "Supported tags and Dockerfile links" portion of an im
5252
{{- $arch := $archSpecific | ternary arch ($e.HasArchitecture arch | ternary arch ($e.Architectures | first)) -}}
5353

5454
{{- /* force bashbrew to "fetch" the GitCommit so that it is fully resolved */ -}}
55-
{{- $from := $.ArchDockerFrom $arch $e -}}
55+
{{- $froms := $.ArchDockerFroms $arch $e -}}
5656

5757
{{- $gitRepo := $e.ArchGitRepo $arch -}}
5858
{{- $repoUrlBase := $gitRepo | replace "git://" "https://" | trimSuffixes ".git" -}}

.template-helpers/git-prefetch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ for tag in "$tags"; do
2929
{{- $e := $.TagEntry -}}
3030
'"$templateArchVar"'
3131
{{- if $e.HasArchitecture $arch -}}
32-
{{- $from := $.ArchDockerFrom $arch $e -}}
32+
{{- $froms := $.ArchDockerFroms $arch $e -}}
3333
{{- end -}}
3434
' "$repo:$tag" &> /dev/null; then
3535
toFetch+=( "$repo:$tag" )

.template-helpers/variant.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ for tag in "${tags[@]}"; do
9696
done
9797
done
9898

99-
if [ "$text" ]; then
99+
if [ -n "$text" ]; then
100100
default="$([ -f "$repoDir/variant.md" ] && cat "$repoDir/variant.md" || cat "$dir/variant.md")"
101101
default+=$'\n' # parameter expansion eats the trailing newline
102102

103103
# buildpack-deps text
104104
potentialTags="$(bashbrew list --uniq "$bbRepo" | cut -d: -f2)"
105105
for tag in $potentialTags; do
106-
baseImage="$(bashbrew cat -f '{{ .ArchDockerFrom (.TagEntry.Architectures | first) .TagEntry }}' "$bbRepo:$tag")"
106+
baseImage="$(bashbrew cat -f '{{ .ArchLastStageFrom (.TagEntry.Architectures | first) .TagEntry }}' "$bbRepo:$tag" 2>/dev/null)"
107107
case "$baseImage" in
108108
buildpack-deps:*-*) ;; # "scm", "curl" -- not large images
109109
buildpack-deps:*)

0 commit comments

Comments
 (0)