Skip to content

Commit

Permalink
Add slightly more complicated stackbrew versioning logic to account f…
Browse files Browse the repository at this point in the history
…or 5.7
  • Loading branch information
tianon committed Aug 8, 2014
1 parent 15ac8cf commit 2fe21c7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ echo '# maintainer: InfoSiftr <[email protected]> (@infosiftr)'
for version in "${versions[@]}"; do
commit="$(git log -1 --format='format:%H' "$version")"
fullVersion="$(grep -m1 'ENV MYSQL_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)"
versionAliases=( $fullVersion $version ${aliases[$version]} )
versionAliases=()
while [ "$fullVersion" != "$version" -a "${fullVersion%[.-]*}" != "$fullVersion" ]; do
versionAliases+=( $fullVersion )
fullVersion="${fullVersion%[.-]*}"
done
versionAliases+=( $version ${aliases[$version]} )

echo
for va in "${versionAliases[@]}"; do
Expand Down

0 comments on commit 2fe21c7

Please sign in to comment.