mirror of
https://github.com/docker-library/php.git
synced 2025-08-15 22:03:00 +00:00
Move GPG keys into the template
They don't change within a release very often, so it doesn't feel "correct" to embed them in the block of more dynamic information we embed in versions.json (and IMO we get slightly better syntax this way).
This commit is contained in:
41
versions.sh
41
versions.sh
@ -1,36 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
# https://www.php.net/gpg-keys.php
|
||||
declare -A gpgKeys=(
|
||||
# https://wiki.php.net/todo/php81
|
||||
# krakjoe & ramsey & patrickallaert
|
||||
# https://www.php.net/gpg-keys.php#gpg-8.1
|
||||
[8.1]='528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC3F9C39DC0B9698544 F1F692238FBC1666E5A5CCD4199F9DFEF6FFBAFD'
|
||||
|
||||
# https://wiki.php.net/todo/php80
|
||||
# pollita & carusogabriel
|
||||
# https://www.php.net/gpg-keys.php#gpg-8.0
|
||||
[8.0]='1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F'
|
||||
|
||||
# https://wiki.php.net/todo/php74
|
||||
# petk & derick
|
||||
# https://www.php.net/gpg-keys.php#gpg-7.4
|
||||
[7.4]='42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312'
|
||||
|
||||
# https://wiki.php.net/todo/php73
|
||||
# cmb & stas
|
||||
# https://www.php.net/gpg-keys.php#gpg-7.3
|
||||
[7.3]='CBAF69F173A0FEA4B537F470D66C9593118BCCB6 F38252826ACD957EF380D39F2F7956BC5DA04B5D'
|
||||
|
||||
# https://wiki.php.net/todo/php72
|
||||
# pollita & remi
|
||||
# https://www.php.net/downloads.php#gpg-7.2
|
||||
# https://www.php.net/gpg-keys.php#gpg-7.2
|
||||
[7.2]='1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F'
|
||||
)
|
||||
# see https://www.php.net/downloads.php
|
||||
|
||||
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
|
||||
|
||||
versions=( "$@" )
|
||||
@ -102,14 +72,6 @@ for version in "${versions[@]}"; do
|
||||
ascUrl="${possi[2]}"
|
||||
sha256="${possi[3]}"
|
||||
|
||||
gpgKey="${gpgKeys[$rcVersion]:-}"
|
||||
if [ -z "$gpgKey" ]; then
|
||||
echo >&2 "ERROR: missing GPG key fingerprint for $version"
|
||||
echo >&2 " try looking on https://www.php.net/downloads.php#gpg-$rcVersion"
|
||||
echo >&2 " (and update 'gpgKeys' array in '$BASH_SOURCE')"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! wget -q --spider "$url"; then
|
||||
echo >&2 "error: '$url' appears to be missing"
|
||||
exit 1
|
||||
@ -144,7 +106,7 @@ for version in "${versions[@]}"; do
|
||||
|
||||
echo "$version: $fullVersion"
|
||||
|
||||
export fullVersion url ascUrl sha256 gpgKey
|
||||
export fullVersion url ascUrl sha256
|
||||
json="$(
|
||||
jq <<<"$json" -c \
|
||||
--argjson variants "$variants" \
|
||||
@ -153,7 +115,6 @@ for version in "${versions[@]}"; do
|
||||
url: env.url,
|
||||
ascUrl: env.ascUrl,
|
||||
sha256: env.sha256,
|
||||
gpgKeys: env.gpgKey,
|
||||
variants: $variants,
|
||||
}'
|
||||
)"
|
||||
|
Reference in New Issue
Block a user