Get latest Veresion of gitea from github

fix #4
This commit is contained in:
2020-01-18 23:26:12 +01:00
parent 0cded7c888
commit e1bada678b

View File

@@ -4,13 +4,20 @@
## Installation of self hosted git service Gitea
toolName="gitea"
giteaVersion="1.10.1"
giteaLatestUrl="https://api.github.com/repos/go-gitea/gitea/releases/latest"
giteaVersion=$(curl --silent "$giteaLatestUrl" | grep -Po '"tag_name": "v\K.*?(?=")')
giteaDownload="https://dl.gitea.io/gitea/${giteaVersion}/gitea-${giteaVersion}-linux-arm-6"
giteaDir="/usr/local/bin"
giteaLoc="${giteaDir}/gitea"
giteaService="https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service"
giteaServiceLoc="/etc/systemd/system/gitea.service"
step_config() {
if [ -z $giteaVersion ] ; then
echoerr " [E] Couldn't determine latest version of $toolName"
fi
}
step_1_info() { echo "Updating apt"; }
step_1() {
exe apt update
@@ -158,10 +165,7 @@ step_20() {
}
# Sequence Revision
VERSION_SEQREV=3
VERSION_SEQREV=10
# Workaround when called from different directory
# Not needed when path to sequencer is absolut
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >>/dev/null 2>&1 && pwd )"
# Path to sequencer
. ${DIR}/../sequencer/sequencer.sh
. /usr/local/bin/sequencer.sh