| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | if [scip-shell system . . `[`. -z "$1" ]; then |
| 4 | echoscip-shell system . . echo. "Missing repo to upload!" |
| 5 | exit 1 |
| 6 | fi |
| 7 | |
| 8 | if [scip-shell system . . `[`. -n "${CI_COMMIT_TAG}" ]; then |
| 9 | BUILD_URL=$(./flat-manager-client create --public_download https://flatpak.neko.dev stable) |
| 10 | elif [scip-shell system . . `[`. "master" = "${CI_COMMIT_REF_NAME}" ]; then |
| 11 | BUILD_URL=$(./flat-manager-client create --public_download https://flatpak.neko.dev nightly) |
| 12 | fi |
| 13 | |
| 14 | if [scip-shell system . . `[`. -z "${BUILD_URL}" ]; then |
| 15 | echoscip-shell system . . echo. "No upload to repo." |
| 16 | exit 0 |
| 17 | fi |
| 18 | |
| 19 | BUILD_URL=${BUILD_URL/http:/https:} |
| 20 | |
| 21 | ./flat-manager-client push --commit --wait --wait-update $BUILD_URL $1 |
| 22 | ./flat-manager-client publish --wait --wait-update $BUILD_URL |
| 23 |