Skip to content

Commit

Permalink
Fix "passenger" tagging bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Dec 2, 2021
1 parent 609e8f9 commit 6befd08
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,21 @@ join() {
}

for version in "${versions[@]}"; do
# normally this would be down in the other loop, but "passenger" doesn't have it, so this is the simplest option (we just can't ever have "alpine" be out of sync, so we should remove it instead if it ever needs to be out of sync)
fullVersion="$(git show "$commit":"$version/Dockerfile" | awk '$1 == "ENV" && $2 == "REDMINE_VERSION" { print $3; exit }')"

versionAliases=(
$fullVersion
$version
${aliases[$version]:-}
)

for variant in '' passenger alpine; do
dir="$version${variant:+/$variant}"
[ -f "$dir/Dockerfile" ] || continue

commit="$(dirCommit "$dir")"

fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "REDMINE_VERSION" { print $3; exit }')"

versionAliases=(
$fullVersion
$version
${aliases[$version]:-}
)

if [ -n "$variant" ]; then
variantAliases=( "${versionAliases[@]/%/-$variant}" )
variantAliases=( "${variantAliases[@]//latest-/}" )
Expand Down

0 comments on commit 6befd08

Please sign in to comment.