mirror of
https://gitlab.com/packaging/gitea
synced 2024-12-18 16:13:44 +00:00
b4da93c2e7
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
30 lines
542 B
Bash
30 lines
542 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
VERSION=$(echo "${CI_COMMIT_TAG#*v}" | cut -d'+' -f1)
|
|
PATCHLEVEL=$(echo "${CI_COMMIT_TAG}" | cut -d'+' -f2)
|
|
export VERSION PATCHLEVEL
|
|
|
|
if [ ! -f /etc/init.d/gitea ]; then
|
|
install -m 755 "${CI_PROJECT_DIR}"/.gitlab-ci/init /etc/init.d/gitea
|
|
fi
|
|
|
|
start_gitea() {
|
|
/etc/init.d/gitea start
|
|
sleep 10
|
|
if ! /etc/init.d/gitea status | grep 'gitea is running'; then
|
|
cat /var/lib/gitea/log/gitea.log
|
|
fi
|
|
}
|
|
|
|
restart_gitea() {
|
|
/etc/init.d/gitea stop
|
|
start_gitea
|
|
}
|
|
|
|
sleep 5
|
|
|
|
apt-get update
|
|
apt-get -y install curl jq
|