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