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
|
|
|
|
#
|
|
|
|
# AppImage
|
|
|
|
#
|
|
|
|
# versioned
|
2023-01-30 11:08:01 +00:00
|
|
|
curl --user ${gitea_user}:${gitea_token} \
|
2023-01-30 13:07:38 +00:00
|
|
|
--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
|
2023-01-30 11:08:01 +00:00
|
|
|
fi
|
|
|
|
|