mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-15 17:15:00 +00:00
refactor: Improve version handling and cleanup version-related files
This commit is contained in:
parent
295040c94c
commit
0dbaec553f
5 changed files with 17 additions and 9 deletions
|
@ -4,14 +4,17 @@ __version__ = "0.65.2.dev"
|
|||
safe_version = __version__
|
||||
|
||||
try:
|
||||
from aider.__version__ import __version__
|
||||
from aider._version import __version__
|
||||
except Exception:
|
||||
__version__ = safe_version + ".import"
|
||||
__version__ = safe_version + "+import"
|
||||
|
||||
try:
|
||||
if version.parse(__version__) < version.parse(safe_version):
|
||||
__version__ = safe_version + ".less"
|
||||
except Exception:
|
||||
__version__ = safe_version + ".parse"
|
||||
if type(__version__) is not str:
|
||||
__version__ = safe_version + "+type"
|
||||
else:
|
||||
try:
|
||||
if version.parse(__version__) < version.parse(safe_version):
|
||||
__version__ = safe_version + "+less"
|
||||
except Exception:
|
||||
__version__ = safe_version + "+parse"
|
||||
|
||||
__all__ = [__version__]
|
||||
|
|
|
@ -914,7 +914,7 @@ class Commands:
|
|||
|
||||
def cmd_quit(self, args):
|
||||
"Exit the application"
|
||||
sys.exit()
|
||||
self.cmd_exit(args)
|
||||
|
||||
def cmd_ls(self, args):
|
||||
"List all known files and indicate which are included in the chat session"
|
||||
|
|
|
@ -949,6 +949,10 @@ def is_first_run_of_new_version(io, verbose=False):
|
|||
installs_file = Path.home() / ".aider" / "installs.json"
|
||||
key = (__version__, sys.executable)
|
||||
|
||||
# Never show notes for .dev versions
|
||||
if ".dev" in __version__:
|
||||
return False
|
||||
|
||||
if verbose:
|
||||
io.tool_output(
|
||||
f"Checking imports for version {__version__} and executable {sys.executable}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue