matrixion/scripts/upload-to-flatpak-repo.sh

24 lines
595 B
Bash
Raw Permalink Normal View History

2021-02-23 21:26:26 +03:00
#!/bin/bash
if [ -z "$1" ]; then
echo "Missing repo to upload!"
exit 1
fi
if [ -n "${CI_COMMIT_TAG}" ]; then
2023-02-07 00:55:57 +03:00
BUILD_URL=$(./flat-manager-client create --public_download https://flatpak.neko.dev stable)
2021-02-23 21:26:26 +03:00
elif [ "master" = "${CI_COMMIT_REF_NAME}" ]; then
2023-02-07 00:55:57 +03:00
BUILD_URL=$(./flat-manager-client create --public_download https://flatpak.neko.dev nightly)
2021-02-23 21:26:26 +03:00
fi
if [ -z "${BUILD_URL}" ]; then
echo "No upload to repo."
exit 0
fi
BUILD_URL=${BUILD_URL/http:/https:}
2023-02-07 00:55:57 +03:00
./flat-manager-client push --commit --wait --wait-update $BUILD_URL $1
./flat-manager-client publish --wait --wait-update $BUILD_URL
2021-02-23 21:26:26 +03:00