mirror of
https://github.com/docker-library/php.git
synced 2025-07-31 20:56:26 +00:00
Fix version-id bug, drop unused code, check that URL exists before allowing "versions.sh" to continue
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
def version_id:
|
def version_id:
|
||||||
# https://www.php.net/phpversion
|
# https://www.php.net/phpversion
|
||||||
# $version_id = $major_version * 10000 + $minor_version * 100 + $release_version;
|
# $version_id = $major_version * 10000 + $minor_version * 100 + $release_version;
|
||||||
sub("[a-z].*$"; "")
|
sub("[a-zA-Z].*$"; "")
|
||||||
| split(".")
|
| split(".")
|
||||||
| (
|
| (
|
||||||
(.[0] // 0 | tonumber) * 10000
|
(.[0] // 0 | tonumber) * 10000
|
||||||
|
@ -23,8 +23,6 @@ declare -A gpgKeys=(
|
|||||||
# https://www.php.net/downloads.php#gpg-7.2
|
# https://www.php.net/downloads.php#gpg-7.2
|
||||||
# https://www.php.net/gpg-keys.php#gpg-7.2
|
# https://www.php.net/gpg-keys.php#gpg-7.2
|
||||||
[7.2]='1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F'
|
[7.2]='1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F'
|
||||||
|
|
||||||
[7.1]='foo'
|
|
||||||
)
|
)
|
||||||
# see https://www.php.net/downloads.php
|
# see https://www.php.net/downloads.php
|
||||||
|
|
||||||
@ -104,6 +102,11 @@ for version in "${versions[@]}"; do
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! wget -q --spider "$url"; then
|
||||||
|
echo >&2 "error: '$url' appears to be missing"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# if we don't have a .asc URL, let's see if we can figure one out :)
|
# if we don't have a .asc URL, let's see if we can figure one out :)
|
||||||
if [ -z "$ascUrl" ] && wget -q --spider "$url.asc"; then
|
if [ -z "$ascUrl" ] && wget -q --spider "$url.asc"; then
|
||||||
ascUrl="$url.asc"
|
ascUrl="$url.asc"
|
||||||
|
Reference in New Issue
Block a user