bugfix gitea, fix output for go alias
[webi-installers/.git] / gitea / install.sh
1 set -e
2 set -u
3
4 pkg_cmd_name="gitea"
5 WEBI_SINGLE=true
6
7 pkg_get_current_version() {
8     # 'gitea version' has output in this format:
9     #       v2.1.0 h1:pQSaIJGFluFvu8KDGDODV8u4/QRED/OPyIR+MWYYse8=
10     # This trims it down to just the version number:
11     #       2.0.0
12     echo "$(gitea --version 2>/dev/null | head -n 1 | cut -d' ' -f3)"
13 }
14
15 pkg_format_cmd_version() {
16     # 'gitea v2.1.0' is the canonical version format for gitea
17     my_version="$1"
18     echo "$pkg_cmd_name v$my_version"
19 }