Skip to content

Commit

Permalink
gives enough information to allow upload of AppImage
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Sep 6, 2022
1 parent aee4cca commit ac78581
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ steps:
from_secret: CI_UPLOAD_GIT_USERNAME
commands:
- BUILDNR=$DRONE_BUILD_NUMBER VERSION_SUFFIX=$DRONE_PULL_REQUEST BUILD_UPDATER=ON DESKTOP_CLIENT_ROOT=$DRONE_WORKSPACE /bin/bash -c "./admin/linux/build-appimage.sh"
- DESKTOP_CLIENT_ROOT=$DRONE_WORKSPACE /bin/bash -c "./admin/linux/upload-appimage.sh" || echo "Upload failed, however this is an optional step."
- BUILDNR=$DRONE_BUILD_NUMBER VERSION_SUFFIX=$DRONE_PULL_REQUEST DESKTOP_CLIENT_ROOT=$DRONE_WORKSPACE /bin/bash -c "./admin/linux/upload-appimage.sh" || echo "Upload failed, however this is an optional step."
trigger:
branch:
- master
Expand Down
15 changes: 14 additions & 1 deletion admin/linux/upload-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ export BUILD=${DRONE_BUILD_NUMBER}
export PR=${DRONE_PULL_REQUEST}
export GIT_USERNAME=${CI_UPLOAD_GIT_USERNAME}
export GIT_TOKEN=${CI_UPLOAD_GIT_TOKEN}

# Needed to get it working on drone
export SUFFIX=${DRONE_PULL_REQUEST:=master}
if [ $SUFFIX != "master" ]; then
SUFFIX="PR-$SUFFIX"
fi
export DESKTOP_CLIENT_ROOT=${DESKTOP_CLIENT_ROOT:-/home/user}
export APPNAME=${APPNAME:-nextcloud}

# Defaults
export GIT_REPO=ci-builds
Expand All @@ -26,7 +33,13 @@ echo `pwd`
ls

# AppImage
export APPIMAGE=$(readlink -f ./Nextcloud*.AppImage)
if [ ! -z "$DRONE_COMMIT" ]
then
export APPIMAGE=$(readlink -f ./${APPNAME}-${SUFFIX}-${DRONE_COMMIT}-x86_64.AppImage)
else
export APPIMAGE=$(readlink -f ./Nextcloud*.AppImage)
fi

export UPDATE=$(readlink -f ./Nextcloud*.AppImage.zsync)
export BASENAME=$(basename ${APPIMAGE})

Expand Down

0 comments on commit ac78581

Please sign in to comment.