Skip to content

Commit

Permalink
Update generate-stackbrew-library.sh to support BASHBREW_LIBRARY
Browse files Browse the repository at this point in the history
…for easier cascading updates

See docker-library/official-images#17640 (comment)
  • Loading branch information
tianon committed Sep 30, 2024
1 parent d6c1c5a commit feb527c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ gawkParents='

getArches() {
local repo="$1"; shift
local officialImagesBase="${BASHBREW_LIBRARY:-https://github.com/docker-library/official-images/raw/HEAD/library}/"

local parentRepoToArchesStr
parentRepoToArchesStr="$(
find -name 'Dockerfile' -exec gawk "$gawkParents" '{}' + \
| sort -u \
| gawk -v officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/' '
| gawk -v officialImagesBase="$officialImagesBase" '
$1 !~ /^('"$repo"'|scratch|.*\/.*)(:|$)/ {
printf "%s%s\n", officialImagesUrl, $1
printf "%s%s\n", officialImagesBase, $1
}
' \
| xargs -r bashbrew cat --format '["{{ .RepoName }}:{{ .TagName }}"]="{{ join " " .TagEntry.Architectures }}"'
Expand Down

0 comments on commit feb527c

Please sign in to comment.