@@ -31,18 +31,19 @@ order=()
31
31
declare -A metas=()
32
32
for tag in $tags ; do
33
33
echo >&2 " Processing $tag ..."
34
+ bashbrewImage=" ${tag##*/ } " # account for BASHBREW_NAMESPACE being set
34
35
meta=" $(
35
36
bashbrew cat --format '
36
37
{{- $e := .TagEntry -}}
37
38
{{- "{" -}}
38
39
"name": {{- json ($e.Tags | first) -}},
39
- "tags": {{- json ($.Tags "" false $e) -}},
40
+ "tags": {{- json ($.Tags namespace false $e) -}},
40
41
"directory": {{- json $e.Directory -}},
41
42
"file": {{- json $e.File -}},
42
43
"constraints": {{- json $e.Constraints -}},
43
44
"froms": {{- json ($.DockerFroms $e) -}}
44
45
{{- "}" -}}
45
- ' " $tag " | jq -c '
46
+ ' " $bashbrewImage " | jq -c '
46
47
{
47
48
name: .name,
48
49
os: (
@@ -86,9 +87,10 @@ for tag in $tags; do
86
87
'
87
88
) "
88
89
89
- parent=" $( bashbrew parents " $tag " | tail -1) " # if there ever exists an image with TWO parents in the same repo, this will break :)
90
+ parent=" $( bashbrew parents " $bashbrewImage " | tail -1) " # if there ever exists an image with TWO parents in the same repo, this will break :)
90
91
if [ -n " $parent " ]; then
91
- parent=" $( bashbrew list --uniq " $parent " ) " # normalize
92
+ parentBashbrewImage=" ${parent##*/ } " # account for BASHBREW_NAMESPACE being set
93
+ parent=" $( bashbrew list --uniq " $parentBashbrewImage " ) " # normalize
92
94
parentMeta=" ${metas["$parent"]} "
93
95
parentMeta=" $( jq -c --argjson meta " $meta " '
94
96
. + {
0 commit comments