From a24551e46554a6ed7c0b96831dc8dd0b4215f339 Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Mon, 30 Jan 2023 12:08:01 +0100 Subject: [PATCH 1/3] added script to upload AppImage to gitea instance --- tools/upload_gitea.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tools/upload_gitea.sh diff --git a/tools/upload_gitea.sh b/tools/upload_gitea.sh new file mode 100644 index 0000000..fa189d6 --- /dev/null +++ b/tools/upload_gitea.sh @@ -0,0 +1,9 @@ +#!/bin/bash +if [ -z ${GO_PIPELINE_LABEL} ]; then + echo "GO_PIPELINE_LABEL is not set. doing nothing" +else + curl --user ${gitea_user}:${gitea_token} \ + --upload-file NMReval-${GO_PIPELINE_LABEL}-x86_64.AppImage \ + https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${gitea_user}/generic/NMReval/${GO_PIPELINE_LABEL}/NMReval-${GO_PIPELINE_LABEL}-x86_64.AppImage +fi + From a122bb80f489a2c9cd20151c841ef3eff44865b0 Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Mon, 30 Jan 2023 12:14:24 +0100 Subject: [PATCH 2/3] fixed script permission --- tools/upload_gitea.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/upload_gitea.sh diff --git a/tools/upload_gitea.sh b/tools/upload_gitea.sh old mode 100644 new mode 100755 From 176c3557320c6ff9e474ad6a3925505ad7607cdb Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Mon, 30 Jan 2023 14:07:38 +0100 Subject: [PATCH 3/3] added 'latest' packages to gitea upload --- tools/upload_gitea.sh | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/tools/upload_gitea.sh b/tools/upload_gitea.sh index fa189d6..81d6017 100755 --- a/tools/upload_gitea.sh +++ b/tools/upload_gitea.sh @@ -2,8 +2,35 @@ if [ -z ${GO_PIPELINE_LABEL} ]; then echo "GO_PIPELINE_LABEL is not set. doing nothing" else + APPIMAGE=NMReval-${GO_PIPELINE_LABEL}-x86_64.AppImage + ZSYNC=NMReval-${GO_PIPELINE_LABEL}-x86_64.AppImage.zsync + # + # AppImage + # + # versioned curl --user ${gitea_user}:${gitea_token} \ - --upload-file NMReval-${GO_PIPELINE_LABEL}-x86_64.AppImage \ - https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${gitea_user}/generic/NMReval/${GO_PIPELINE_LABEL}/NMReval-${GO_PIPELINE_LABEL}-x86_64.AppImage + --upload-file $APPIMAGE \ + https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${gitea_user}/generic/NMReval/${GO_PIPELINE_LABEL}/$APPIMAGE + # latest + curl --user ${gitea_user}:${gitea_token} --delete \ + https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${gitea_user}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage + + curl --user ${gitea_user}:${gitea_token} \ + --upload-file $APPIMAGE \ + https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${gitea_user}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage + # + # zsync files + # + # versioned + curl --user ${gitea_user}:${gitea_token} \ + --upload-file $ZSYNC \ + https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${gitea_user}/generic/NMReval/${GO_PIPELINE_LABEL}/$ZSYNC + # latest + curl --user ${gitea_user}:${gitea_token} --delete \ + https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${gitea_user}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage.zsync + + curl --user ${gitea_user}:${gitea_token} \ + --upload-file $ZSYNC \ + https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${gitea_user}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage.zsync fi