6 pkg_get_current_version() {
7 # 'gitea version' has output in this format:
8 # v2.1.0 h1:pQSaIJGFluFvu8KDGDODV8u4/QRED/OPyIR+MWYYse8=
9 # This trims it down to just the version number:
11 echo "$(gitea --version 2>/dev/null | head -n 1 | cut -d' ' -f3)"
14 pkg_format_cmd_version() {
15 # 'gitea v2.1.0' is the canonical version format for gitea
17 echo "$pkg_cmd_name v$my_version"