1
0
mirror of https://gitlab.com/packaging/gitea synced 2024-12-23 02:26:42 +00:00
gitea_packaging/.gitlab-ci/test.sh

25 lines
455 B
Bash
Raw Permalink Normal View History

2020-06-20 08:55:39 +00:00
#!/bin/bash
2020-06-20 09:13:42 +00:00
set -e
2020-06-20 08:55:39 +00:00
VERSION=$(echo "${CI_COMMIT_TAG#*v}" | cut -d'-' -f1)
PATCHLEVEL=$(echo "${CI_COMMIT_TAG}" | cut -d'-' -f2)
2020-06-20 12:39:39 +00:00
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
}
2020-06-20 08:55:39 +00:00
apt-get -qq update
2020-06-20 12:39:39 +00:00
apt-get -qqy install curl jq