1
0
mirror of https://gitlab.com/packaging/gitea synced 2025-05-14 06:43:17 +00:00
gitea_packaging/.gitlab-ci/test-update.sh
morph027 d0d02306ab
skip update test when previous version is unavailable
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2025-05-13 09:38:27 +02:00

17 lines
662 B
Bash
Executable File

#!/bin/bash
. "${CI_PROJECT_DIR}/.gitlab-ci/test.sh"
curl -sL -o /etc/apt/trusted.gpg.d/morph027-gitea.asc https://packaging.gitlab.io/gitea/gpg.key
echo "deb [arch=amd64] https://packaging.gitlab.io/gitea gitea main" > /etc/apt/sources.list.d/morph027-gitea.list
if ! apt-get update; then
exit 0
fi
apt-get -y install gitea
install -o gitea -g gitea -m 644 "/${CI_PROJECT_DIR}/.gitlab-ci/app.ini" /etc/gitea/app.ini
start_gitea
curl -s localhost:3000/api/v1/version | jq -e '.version'
apt-get -y --allow-downgrades install "${CI_PROJECT_DIR}/gitea_${VERSION}+${PATCHLEVEL}_amd64.deb"
restart_gitea
curl -s localhost:3000/api/v1/version | jq -e '.version'