Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 0 additions & 92 deletions utils/version_checker.py

This file was deleted.

5 changes: 3 additions & 2 deletions vast.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ def get_git_version():

return tag[1:] if tag.startswith("v") else tag
except Exception:
return "0.0.0"
return "0.0.0-git"


def get_pip_version():
try:
return importlib.metadata.version("vastai")
except Exception:
return "0.0.0"
return "0.0.0-pip"


def is_pip_package():
Expand Down Expand Up @@ -157,6 +157,7 @@ def get_pypi_version(project_data: dict[str, dict[str, str]]) -> str:
version_data: str = str(info_data.get("version"))

return str(version_data)

def check_for_update():
pypi_data = get_project_data("vastai")
pypi_version = get_pypi_version(pypi_data)
Expand Down