1
0
forked from IPKM/nmreval
nmreval/tools/upload_gitea.sh

38 lines
1.5 KiB
Bash
Raw Permalink Normal View History

#!/bin/bash
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
2023-02-06 19:38:04 +00:00
GITEA_OWNER=IPKM
#
# AppImage
#
# versioned
2023-02-07 00:03:05 +00:00
curl -sS --user ${gitea_user}:${gitea_token} \
--upload-file $APPIMAGE \
2023-02-02 17:45:18 +00:00
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/${GO_PIPELINE_LABEL}/$APPIMAGE
# latest
2023-02-07 00:03:05 +00:00
curl -sS --user ${gitea_user}:${gitea_token} -X DELETE \
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage
2023-02-07 00:03:05 +00:00
curl -sS --user ${gitea_user}:${gitea_token} \
--upload-file $APPIMAGE \
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage
#
# zsync files
#
# versioned
2023-02-07 00:03:05 +00:00
curl -sS --user ${gitea_user}:${gitea_token} \
--upload-file $ZSYNC \
2023-02-02 17:45:18 +00:00
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/${GO_PIPELINE_LABEL}/$ZSYNC
# latest
2023-02-07 00:03:05 +00:00
curl -sS --user ${gitea_user}:${gitea_token} -X DELETE \
2023-02-02 17:45:18 +00:00
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage.zsync
2023-02-07 00:03:05 +00:00
curl -sS --user ${gitea_user}:${gitea_token} \
--upload-file $ZSYNC \
2023-02-02 17:45:18 +00:00
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage.zsync
fi