Attempt again to capture error code

This commit is contained in:
Antoine Martin 2024-10-22 19:32:33 -04:00
parent bf51bb5980
commit 4242e8dd24
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -33,8 +33,9 @@ jobs:
count=1
while read pkgs; do
echo "[ $count / $total ] Sending $pkgs"
# if fails continues to next
if `wget -q $upstream/x86_64/$pkgs.apk`; then
result=$(wget -q $upstream/x86_64/$pkgs.apk || true)
# if it doesn't exist, it is because it failed to download.
if [ -f $pkgs.apk ]; then
result=`curl -s --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file $pkgs.apk $downstream`
if [ -n "$result" ]; then
echo $result
@ -42,6 +43,7 @@ jobs:
rm -f $pkgs.apk
else
echo "Error: Couldn't download $pkgs"
echo $result
fi
count=$(( count + 1 ))
done < missing