mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-01-09 15:59:30 +00:00
14 lines
391 B
Python
14 lines
391 B
Python
# MIT licensed
|
|
# Copyright (c) 2020 Felix Yan <felixonmars@archlinux.org>, et al.
|
|
|
|
from .cmd import run_cmd # type: ignore
|
|
|
|
async def get_version(
|
|
name, conf, *, cache, keymanager=None
|
|
):
|
|
git = conf['git']
|
|
cmd = f"git ls-remote -t --refs {git}"
|
|
data = await cache.get(cmd, run_cmd)
|
|
versions = list(map(lambda line: line.split("refs/tags/")[1], data.split("\n")))
|
|
return versions
|