diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 8e00b37b..56dc0f4e 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -30,6 +30,7 @@ jobs: cd build docker run --tty \ -v ${PWD}/fpm:/root/fpm \ + -v ${PWD}/deb-dists.sh:/root/deb-dists.sh \ fpm /bin/bash -c "./fpm.sh ${{ github.event.inputs.tag }}" - name: Upload artifacts diff --git a/build/deb-dists.sh b/build/deb-dists.sh new file mode 100644 index 00000000..bec19d98 --- /dev/null +++ b/build/deb-dists.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Debian/Ubuntu distributions +# Shared between fpm.sh and deb-repo.sh + +deb_dists=( + xenial # 16.04 + bionic # 18.04 + focal # 20.04 + jammy # 22.04 + noble # 24.04 + plucky # 25.04 + stretch # 9 + buster # 10 + bullseye # 11 + bookworm # 12 + trixie # 13 +) diff --git a/build/deb-repo.sh b/build/deb-repo.sh index e7f61c91..b942c71d 100755 --- a/build/deb-repo.sh +++ b/build/deb-repo.sh @@ -2,19 +2,7 @@ gpg --batch --import key-private.asc -dists=( - xenial # 16.04 - bionic # 18.04 - focal # 20.04 - jammy # 22.04 - noble # 24.04 - plucky # 25.04 - stretch # 9 - buster # 10 - bullseye # 11 - bookworm # 12 - trixie # 13 -) +source build/deb-dists.sh architectures="amd64 arm64" @@ -22,7 +10,7 @@ symlink_pkg='pkg=${0/pool/$1}; mkdir -p $(dirname $pkg); [ ! -L $pkg ] && ln -sr cd deb -for dist in "${dists[@]}"; do +for dist in "${deb_dists[@]}"; do find pool -name "*$dist*.deb" -exec bash -c "$symlink_pkg" {} pools/$dist \; for arch in $architectures; do diff --git a/build/fpm/fpm.sh b/build/fpm/fpm.sh index cb3088f6..8e0c704e 100755 --- a/build/fpm/fpm.sh +++ b/build/fpm/fpm.sh @@ -3,6 +3,7 @@ set -e source /root/fpm/helpers.sh +source /root/deb-dists.sh version=$1 baseurl="https://builds.r2.relay.so/$version/relay-$version" @@ -19,21 +20,7 @@ declare -A php_api=( packages=() -debs=( - xenial # 16.04 - bionic # 18.04 - focal # 20.04 - jammy # 22.04 - noble # 24.04 - plucky # 25.04 - stretch # 9 - buster # 10 - bullseye # 11 - bookworm # 12 - trixie # 13 -) - -for deb in "${debs[@]}"; do +for deb in "${deb_dists[@]}"; do case "$deb" in jammy | noble | plucky | bookworm | trixie) variant=+libssl3 ;; *) variant="" ;;