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:
12 echo "$(gitea --version 2>/dev/null | head -n 1 | cut -d' ' -f3)"
15 pkg_format_cmd_version() {
16 # 'gitea v2.1.0' is the canonical version format for gitea
18 echo "$pkg_cmd_name v$my_version"