Merge pull request #3736 from Thatoo/AutoUpdateAppImage

Auto update app image
This commit is contained in:
Felix Weilbach 2021-10-20 16:00:46 +02:00 committed by GitHub
commit ed7abc4a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -98,7 +98,7 @@ name: AppImage
steps:
- name: build
image: ghcr.io/nextcloud/continuous-integration-client-appimage:client-appimage-2
image: ghcr.io/nextcloud/continuous-integration-client-appimage:client-appimage-3
environment:
CI_UPLOAD_GIT_TOKEN:
from_secret: CI_UPLOAD_GIT_TOKEN

View File

@ -102,7 +102,7 @@ export LD_LIBRARY_PATH=/app/usr/lib/
./squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/' /app/usr/lib/lib${APPNAME}sync.so.0
# Build AppImage
./squashfs-root/AppRun ${DESKTOP_FILE} -appimage
./squashfs-root/AppRun ${DESKTOP_FILE} -appimage -updateinformation="gh-releases-zsync|nextcloud-releases|desktop|latest|Nextcloud-*-x86_64.AppImage.zsync"
#move AppImage
if [ ! -z "$DRONE_COMMIT" ]

View File

@ -24,6 +24,7 @@ cd /build
# AppImage
export APPIMAGE=$(readlink -f ./Nextcloud*.AppImage)
export UPDATE==$(readlink -f ./Nextcloud*.AppImage.zsync)
export BASENAME=$(basename ${APPIMAGE})
if ! test -e $APPIMAGE ; then
@ -70,6 +71,7 @@ upload_release_asset()
{
uploadUrl=$1
echo $(curl --max-time 900 -u $GIT_USERNAME:$GIT_TOKEN -X POST $uploadUrl --header "Content-Type: application/octet-stream" --upload-file $APPIMAGE)
echo $(curl --max-time 900 -u $GIT_USERNAME:$GIT_TOKEN -X POST $uploadUrl --header "Content-Type: application/octet-stream" --upload-file $UPDATE)
}
delete_release_asset()
@ -132,4 +134,4 @@ if [ $TAG_NAME != "master" ]; then
fi
echo
echo "AppImage link: $browserDownloadUrl"
echo "AppImage link: $browserDownloadUrl"