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-02 17:45:18 +00:00
|
|
|
GITEA_OWNER=IPKM-Public
|
2023-01-30 13:07:38 +00:00
|
|
|
#
|
|
|
|
# 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 \
|
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
|
|
|
|
curl --user ${gitea_user}:${gitea_token} --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
|
2023-01-30 13:07:38 +00:00
|
|
|
|
|
|
|
curl --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/latest/NMReval-latest-x86_64.Appimage
|
2023-01-30 13:07:38 +00:00
|
|
|
#
|
|
|
|
# zsync files
|
|
|
|
#
|
|
|
|
# versioned
|
|
|
|
curl --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
|
2023-01-30 13:07:38 +00:00
|
|
|
# latest
|
|
|
|
curl --user ${gitea_user}:${gitea_token} --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
|
|
|
|
|
|
|
curl --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
|
2023-01-30 11:08:01 +00:00
|
|
|
fi
|
|
|
|
|