2014-08-21 01:50:02 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
declare -A aliases
|
|
|
|
aliases=(
|
2014-08-27 23:18:39 +02:00
|
|
|
[5.6]='5 latest'
|
2014-08-21 01:50:02 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
|
|
|
|
|
|
|
|
versions=( */ )
|
|
|
|
versions=( "${versions[@]%/}" )
|
|
|
|
url='git://github.com/docker-library/php'
|
|
|
|
|
|
|
|
echo '# maintainer: InfoSiftr <github@infosiftr.com> (@infosiftr)'
|
|
|
|
|
|
|
|
for version in "${versions[@]}"; do
|
2014-11-07 01:41:50 +01:00
|
|
|
commit="$(git log -1 --format='format:%H' -- "$version")"
|
2014-08-21 01:50:02 +02:00
|
|
|
fullVersion="$(grep -m1 'ENV PHP_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)"
|
|
|
|
versionAliases=( $fullVersion $version ${aliases[$version]} )
|
|
|
|
|
|
|
|
echo
|
|
|
|
for va in "${versionAliases[@]}"; do
|
2014-10-08 00:41:32 +02:00
|
|
|
if [ "$va" = 'latest' ]; then
|
|
|
|
va='cli'
|
|
|
|
else
|
2014-08-21 01:50:02 +02:00
|
|
|
va="$va-cli"
|
|
|
|
fi
|
|
|
|
echo "$va: ${url}@${commit} $version"
|
|
|
|
done
|
2014-10-08 00:41:32 +02:00
|
|
|
for va in "${versionAliases[@]}"; do
|
|
|
|
echo "$va: ${url}@${commit} $version"
|
|
|
|
done
|
2014-08-21 01:50:02 +02:00
|
|
|
|
2014-11-07 01:41:50 +01:00
|
|
|
for variant in apache fpm; do
|
|
|
|
commit="$(git log -1 --format='format:%H' -- "$version/$variant")"
|
2014-08-21 01:50:02 +02:00
|
|
|
echo
|
|
|
|
for va in "${versionAliases[@]}"; do
|
|
|
|
if [ "$va" = 'latest' ]; then
|
|
|
|
va="$variant"
|
|
|
|
else
|
|
|
|
va="$va-$variant"
|
|
|
|
fi
|
|
|
|
echo "$va: ${url}@${commit} $version/$variant"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
done
|