From b0e80c0ba08914b4fbff0ec1a5c5097f9e093e10 Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Fri, 3 Jan 2025 22:59:35 -0500 Subject: [PATCH] CI: rewrite the script that downloads the new release from the primary mirror and posts it to github --- .github/workflows/mirror-release.yml | 39 +++++++++++++++++----------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/mirror-release.yml b/.github/workflows/mirror-release.yml index 445f9f294e..217b13669d 100644 --- a/.github/workflows/mirror-release.yml +++ b/.github/workflows/mirror-release.yml @@ -17,21 +17,30 @@ jobs: run: | sudo apt-get install wget ca-certificates gpg sed curl git git pull --tags - while true; do sleep 60m; wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2pinstall_$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')_windows.exe && break; done - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/I2P-Easy-Install-Bundle-$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')-signed.exe - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/I2P-Easy-Install-Bundle-$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||').exe - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2pinstall_$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||').jar - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2pinstall_$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||').jar.sig - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2pinstall_$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')_windows.exe - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2pinstall_$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')_windows.exe.sig - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2psource_$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||').tar.bz2 - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2psource_$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||').tar.bz2.sig - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2pupdate-$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||').su3 - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2pupdate-$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||').su3.torrent - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2pupdate.su3 - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2pupdate_$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||').zip - wget -v https://files.i2p-projekt.de/$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')/i2pupdate_$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||').zip.sig' - echo "$(git describe --abbrev=0 | sed 's|i2p-||g' |sed 's|-.*||')" > CHANGES.md + export I2P_VERSION=$(echo ${{ github.ref_name }} | sed 's|i2p-||g' |sed 's|-.*||') + export ATTEMPTS=0 + while true; do + sleep 60m + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pinstall_"$I2P_VERSION"_windows.exe && break + ATTEMPTS=$(( $ATTEMPTS + 1 )) + if [ $ATTEMPTS -eq 25 ]; then + exit 1 + fi + done + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/I2P-Easy-Install-Bundle-"$I2P_VERSION"-signed.exe + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/I2P-Easy-Install-Bundle-"$I2P_VERSION".exe + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pinstall_"$I2P_VERSION".jar + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pinstall_"$I2P_VERSION".jar.sig + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pinstall_"$I2P_VERSION"_windows.exe + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pinstall_"$I2P_VERSION"_windows.exe.sig + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2psource_"$I2P_VERSION".tar.bz2 + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2psource_"$I2P_VERSION".tar.bz2.sig + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pupdate-"$I2P_VERSION".su3 + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pupdate-"$I2P_VERSION".su3.torrent + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pupdate.su3 + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pupdate_"$I2P_VERSION".zip + wget -v https://files.i2p-projekt.de/"$I2P_VERSION"/i2pupdate_"$I2P_VERSION".zip.sig' + echo ""$I2P_VERSION"" > CHANGES.md echo "===========" >> CHANGES.md echo "" >> CHANGES.md echo "" >> CHANGES.md