Download existing release from github

We need the current state of the package repository in case a build
fails. We need to do this so if a build fails we still have the previous
version of the package to fall back on.
pull/561/head
Greg Land 2 months ago
parent 6aa8a4d22f
commit d3a4243b03
  1. 11
      build-container/entrypoint.sh

@ -39,6 +39,17 @@ set -e
rm -rf /src/repo
mkdir -p /src/repo
# Download the existing packages from experimental so a failure of a kernel build doesn't result in the previously built package going missing.
current_dir=$(pwd)
cd /src/repo
url="https://api.github.com/repos/archzfs/archzfs/releases/latest"
json_response=$(curl -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Ap-Version: 2022-11-28" "${url}")
for x in $(echo "${json_response}" | grep "browser_download_url" | cut -d\" -f4); do
wget "${x}"
done
cd "${current_dir}"
cp -v /scratch/.buildroot/root/repo/*.pkg.tar* /src/repo/
cd /src/repo

Loading…
Cancel
Save