dvershinin / lastversion

Find the latest release version of an arbitrary project
https://lastversion.getpagespeed.com
BSD 2-Clause "Simplified" License
375 stars 33 forks source link

Lastversion fails for GitLab instances with non-standard ports #170

Open fh-igd-mueller-roemer opened 2 months ago

fh-igd-mueller-roemer commented 2 months ago

Project with incorrect version

https://gitlab.vci.rwth-aachen.de:9000/OpenVolumeMesh/OpenVolumeMesh

To Reproduce

lastversion https://gitlab.vci.rwth-aachen.de:9000/OpenVolumeMesh/OpenVolumeMesh --verbose

Expected behavior

Expected output: 3.3.1 (the most recent tag)

Program output

lastversion.lastversion - INFO - Verbose 1 level output.
lastversion.repo_holders.base - INFO - Using cache directory: /home/jsroemer/.cache/lastversion.
lastversion.repo_holders.base - INFO - Created instance of GitLabRepoSession
Traceback (most recent call last):
  File "/home/jsroemer/ci-cd/check-versions/bin/lastversion", line 8, in <module>
    sys.exit(main())
  File "/home/jsroemer/ci-cd/check-versions/lib/python3.10/site-packages/lastversion/lastversion.py", line 851, in main
    res = latest(
  File "/home/jsroemer/ci-cd/check-versions/lib/python3.10/site-packages/lastversion/lastversion.py", line 223, in latest
    with HolderFactory.get_instance_for_repo(
  File "/home/jsroemer/ci-cd/check-versions/lib/python3.10/site-packages/lastversion/holder_factory.py", line 149, in get_instance_for_repo
    return project_hosting_class(repo, hostname)
  File "/home/jsroemer/ci-cd/check-versions/lib/python3.10/site-packages/lastversion/repo_holders/gitlab.py", line 30, in __init__
    super().__init__(repo, hostname)
  File "/home/jsroemer/ci-cd/check-versions/lib/python3.10/site-packages/lastversion/repo_holders/base.py", line 126, in __init__
    self.repo = self.get_base_repo_from_repo_arg(name)
  File "/home/jsroemer/ci-cd/check-versions/lib/python3.10/site-packages/lastversion/repo_holders/base.py", line 236, in get_base_repo_from_repo_arg
    raise ValueError(
ValueError: Repo arg None does not have enough URI components (True) for GitLabRepoSession