File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -38,17 +38,19 @@ dirCommit() {
38
38
39
39
getArches () {
40
40
local repo=" $1 " ; shift
41
- local officialImagesUrl= ' https://github.com/docker-library/official-images/raw/master /library/ '
41
+ local officialImagesBase= " ${BASHBREW_LIBRARY :- https:// github.com/ docker-library/ official-images/ raw/ HEAD / library} / "
42
42
43
- eval " declare -g -A parentRepoToArches=( $(
44
- find " $@ " -name ' Dockerfile' -exec awk '
43
+ local parentRepoToArchesStr
44
+ parentRepoToArchesStr=" $(
45
+ find -name ' Dockerfile' -exec awk -v officialImagesBase=" $officialImagesBase " '
45
46
toupper($1) == "FROM" && $2 !~ /^(' " $repo " ' |scratch|.*\/.*)(:|$)/ {
46
- print " ' " $officialImagesUrl " ' " $2
47
+ printf "%s%s\n", officialImagesBase, $2
47
48
}
48
49
' ' {}' + \
49
50
| sort -u \
50
- | xargs bashbrew cat --format ' [{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
51
- ) )"
51
+ | xargs -r bashbrew cat --format ' ["{{ .RepoName }}:{{ .TagName }}"]="{{ join " " .TagEntry.Architectures }}"'
52
+ ) "
53
+ eval " declare -g -A parentRepoToArches=( $parentRepoToArchesStr )"
52
54
}
53
55
getArches ' tomcat' " $@ "
54
56
@@ -160,7 +162,7 @@ for version; do
160
162
GitCommit: $commit
161
163
Directory: $dir
162
164
EOE
163
- # constraints="$(bashbrew cat --format '{{ .TagEntry.Constraints | join ", " }}' "https://github.com/docker-library/official-images/raw/master /library/$variantParent")"
165
+ # constraints="$(bashbrew cat --format '{{ .TagEntry.Constraints | join ", " }}' "https://github.com/docker-library/official-images/raw/HEAD /library/$variantParent")"
164
166
# [ -z "$constraints" ] || echo "Constraints: $constraints"
165
167
done
166
168
done
You can’t perform that action at this time.
0 commit comments