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 <michael@schuster.ms>
@@ -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
@@ -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!"
@@ -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 "Upload failed, however this is an optional step."
+fi
+# Don't let the Drone build fail
+exit 0