2023-01-30 12:08:01 +01:00
|
|
|
#!/bin/bash
|
|
|
|
if [ -z ${GO_PIPELINE_LABEL} ]; then
|
|
|
|
echo "GO_PIPELINE_LABEL is not set. doing nothing"
|
|
|
|
else
|
2023-01-30 14:07:38 +01:00
|
|
|
APPIMAGE=NMReval-${GO_PIPELINE_LABEL}-x86_64.AppImage
|
|
|
|
ZSYNC=NMReval-${GO_PIPELINE_LABEL}-x86_64.AppImage.zsync
|
2023-02-06 20:38:04 +01:00
|
|
|
GITEA_OWNER=IPKM
|
2023-12-06 17:05:25 +00:00
|
|
|
echo "Upload AppImage started"
|
2023-01-30 14:07:38 +01:00
|
|
|
#
|
|
|
|
# AppImage
|
|
|
|
#
|
|
|
|
# versioned
|
2023-12-06 16:51:16 +01:00
|
|
|
curl -sS --user ${UPLOAD_USER}:${UPLOAD_TOKEN} \
|
2023-01-30 14:07:38 +01:00
|
|
|
--upload-file $APPIMAGE \
|
2023-02-02 18:45:18 +01:00
|
|
|
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/${GO_PIPELINE_LABEL}/$APPIMAGE
|
2023-01-30 14:07:38 +01:00
|
|
|
# latest
|
2023-12-06 16:51:16 +01:00
|
|
|
curl -sS --user ${UPLOAD_USER}:${UPLOAD_TOKEN} -X DELETE \
|
2023-02-07 07:57:56 +01:00
|
|
|
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage
|
2023-01-30 14:07:38 +01:00
|
|
|
|
2023-12-06 16:51:16 +01:00
|
|
|
curl -sS --user ${UPLOAD_USER}:${UPLOAD_TOKEN} \
|
2023-01-30 14:07:38 +01:00
|
|
|
--upload-file $APPIMAGE \
|
2023-02-07 07:57:56 +01:00
|
|
|
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage
|
2023-01-30 14:07:38 +01:00
|
|
|
#
|
|
|
|
# zsync files
|
|
|
|
#
|
|
|
|
# versioned
|
2023-12-06 16:51:16 +01:00
|
|
|
curl -sS --user ${UPLOAD_USER}:${UPLOAD_TOKEN} \
|
2023-01-30 14:07:38 +01:00
|
|
|
--upload-file $ZSYNC \
|
2023-02-02 18:45:18 +01:00
|
|
|
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/${GO_PIPELINE_LABEL}/$ZSYNC
|
2023-01-30 14:07:38 +01:00
|
|
|
# latest
|
2023-12-06 16:51:16 +01:00
|
|
|
curl -sS --user ${UPLOAD_USER}:${UPLOAD_TOKEN} -X DELETE \
|
2023-02-02 18:45:18 +01:00
|
|
|
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage.zsync
|
2023-01-30 14:07:38 +01:00
|
|
|
|
2023-12-06 16:51:16 +01:00
|
|
|
curl -sS --user ${UPLOAD_USER}:${UPLOAD_TOKEN} \
|
2023-01-30 14:07:38 +01:00
|
|
|
--upload-file $ZSYNC \
|
2023-02-02 18:45:18 +01:00
|
|
|
https://gitea.pkm.physik.tu-darmstadt.de/api/packages/${GITEA_OWNER}/generic/NMReval/latest/NMReval-latest-x86_64.Appimage.zsync
|
2023-01-30 12:08:01 +01:00
|
|
|
fi
|
|
|
|
|