2015-07-25 18:42:58 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
|
|
|
|
|
2016-06-14 15:26:11 +00:00
|
|
|
url='https://github.com/joomla/docker-joomla'
|
2015-07-25 18:42:58 +00:00
|
|
|
|
|
|
|
echo '# maintainer: Michael Babker <michael.babker@joomla.org> (@mbabker)'
|
|
|
|
|
|
|
|
defaultVariant='apache'
|
|
|
|
|
2016-03-22 19:36:36 +00:00
|
|
|
for variant in apache apache-php7 fpm fpm-php7; do
|
2015-07-25 18:42:58 +00:00
|
|
|
commit="$(git log -1 --format='format:%H' -- "$variant")"
|
|
|
|
fullVersion="$(grep -m1 'ENV JOOMLA_VERSION ' "$variant/Dockerfile" | cut -d' ' -f3)"
|
|
|
|
|
|
|
|
versionAliases=()
|
|
|
|
while [ "${fullVersion%.*}" != "$fullVersion" ]; do
|
|
|
|
versionAliases+=( $fullVersion-$variant )
|
|
|
|
if [ "$variant" = "$defaultVariant" ]; then
|
|
|
|
versionAliases+=( $fullVersion )
|
|
|
|
fi
|
|
|
|
fullVersion="${fullVersion%.*}"
|
|
|
|
done
|
|
|
|
versionAliases+=( $fullVersion-$variant $variant )
|
|
|
|
if [ "$variant" = "$defaultVariant" ]; then
|
|
|
|
versionAliases+=( $fullVersion latest )
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo
|
|
|
|
for va in "${versionAliases[@]}"; do
|
|
|
|
echo "$va: ${url}@${commit} $variant"
|
|
|
|
done
|
|
|
|
done
|