mirror of
https://gitlab.com/packaging/gitea
synced 2024-12-22 18:14:12 +00:00
25 lines
455 B
Bash
25 lines
455 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
|
|
|
|
start_gitea() {
|
|
systemctl start gitea
|
|
sleep 10
|
|
if ! systemctl is-active gitea; then
|
|
journalctl -lu gitea --no-pager
|
|
fi
|
|
curl -s localhost:3000/api/v1/version | jq -e '.version'
|
|
}
|
|
|
|
restart_gitea() {
|
|
systemctl stop gitea
|
|
start_gitea
|
|
}
|
|
|
|
apt-get -qq update
|
|
apt-get -qqy install curl jq
|