From b801a742811afb0c2bab96c8fea0a584933535e2 Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Tue, 21 Jul 2020 01:20:19 +0200 Subject: [PATCH] Drone Upload: Fix if condition for master, in addition to #2213 Don't try to comment on master (old condition was from a previous version of the script). Signed-off-by: Michael Schuster --- admin/linux/upload-appimage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/linux/upload-appimage.sh b/admin/linux/upload-appimage.sh index d23714108..e008b36a8 100755 --- a/admin/linux/upload-appimage.sh +++ b/admin/linux/upload-appimage.sh @@ -34,7 +34,7 @@ echo "Found AppImage: $BASENAME" apt-get -y install jq -if [[ "$TAG_NAME" != *.master ]]; then +if [ $TAG_NAME != "master" ]; then # Delete all old comments in desktop PR, starting with "AppImage file:" oldComments=$(curl 2>/dev/null -u $GIT_USERNAME:$GIT_TOKEN -X GET $DESKTOP_API_BASE_URL/issues/$PR/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("'${GIT_USERNAME}'") | tostring) + "|" + (.body | test("AppImage file:.*") | tostring)' | grep "true|true" | tr -d "\"" | cut -f1 -d"|") @@ -128,7 +128,7 @@ if [[ "$browserDownloadUrl" == "null" ]]; then exit 3 fi -if [[ "$TAG_NAME" != *.master ]]; then +if [ $TAG_NAME != "master" ]; then # Create comment in desktop PR curl 2>/dev/null -u $GIT_USERNAME:$GIT_TOKEN -X POST $DESKTOP_API_BASE_URL/issues/$PR/comments -d "{ \"body\" : \"AppImage file: [$BASENAME]($browserDownloadUrl)

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data. \" }" fi -- 2.30.2