From: Michael Schuster Date: Sat, 16 Nov 2019 20:36:59 +0000 (+0100) Subject: Make AppImage upload optional and add timeout X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~541^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4fc8936553dfae28edc0e424408d4366081a7045;p=nextcloud-desktop.git Make AppImage upload optional and add timeout Moves the upload into a separate Drone command and adds a timeout for curl to fail after 15 minutes. Returns zero to keep Drone from failing. Signed-off-by: Michael Schuster --- diff --git a/.drone.yml b/.drone.yml index b00420981..e5f8204c5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -322,6 +322,7 @@ steps: image: nextcloudci/client-5.12:client-5.12-5 commands: - /bin/bash -c "./admin/linux/build-appimage.sh" + - /bin/bash -c "./admin/linux/upload-appimage.sh" trigger: branch: - master diff --git a/admin/linux/build-appimage.sh b/admin/linux/build-appimage.sh index 7ea22bf52..a73c45e77 100755 --- a/admin/linux/build-appimage.sh +++ b/admin/linux/build-appimage.sh @@ -100,8 +100,3 @@ export LD_LIBRARY_PATH=/app/usr/lib/ ./squashfs-root/AppRun ${DESKTOP_FILE} -appimage mv Nextcloud*.AppImage Nextcloud-${SUFFIX}-${DRONE_COMMIT}-x86_64.AppImage - -curl --upload-file $(readlink -f ./Nextcloud*.AppImage) https://transfer.sh/Nextcloud-${SUFFIX}-${DRONE_COMMIT}-x86_64.AppImage - -echo -echo "Get the AppImage at the link above!" diff --git a/admin/linux/upload-appimage.sh b/admin/linux/upload-appimage.sh new file mode 100755 index 000000000..518a33101 --- /dev/null +++ b/admin/linux/upload-appimage.sh @@ -0,0 +1,19 @@ +#! /bin/bash + +set -xe + +# Upload AppImage +APPIMAGE=$(readlink -f ./Nextcloud*.AppImage) +BASENAME=$(basename ${APPIMAGE}) + +if curl --max-time 900 --upload-file ${APPIMAGE} https://transfer.sh/${BASENAME} +then + echo + echo "Get the AppImage at the link above!" +else + echo + echo "Upload failed, however this is an optional step." +fi + +# Don't let the Drone build fail +exit 0 \ No newline at end of file