mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
feat: Add --install-main-branch switch
This commit is contained in:
parent
de19c0aff0
commit
475a1ed6d6
3 changed files with 13 additions and 2 deletions
|
@ -503,6 +503,12 @@ def get_parser(default_config_files, git_root):
|
||||||
help="Check for new aider versions on launch",
|
help="Check for new aider versions on launch",
|
||||||
default=True,
|
default=True,
|
||||||
)
|
)
|
||||||
|
group.add_argument(
|
||||||
|
"--install-main-branch",
|
||||||
|
action="store_true",
|
||||||
|
help="Install the latest version from the main branch",
|
||||||
|
default=False,
|
||||||
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--apply",
|
"--apply",
|
||||||
metavar="FILE",
|
metavar="FILE",
|
||||||
|
|
|
@ -430,6 +430,11 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||||
update_available = check_version(io, just_check=True, verbose=args.verbose)
|
update_available = check_version(io, just_check=True, verbose=args.verbose)
|
||||||
return 0 if not update_available else 1
|
return 0 if not update_available else 1
|
||||||
|
|
||||||
|
if args.install_main_branch:
|
||||||
|
from aider.versioncheck import install_from_main_branch
|
||||||
|
success = install_from_main_branch(io)
|
||||||
|
return 0 if success else 1
|
||||||
|
|
||||||
if args.check_update:
|
if args.check_update:
|
||||||
check_version(io, verbose=args.verbose)
|
check_version(io, verbose=args.verbose)
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ def install_from_main_branch(io):
|
||||||
"""
|
"""
|
||||||
return utils.check_pip_install_extra(
|
return utils.check_pip_install_extra(
|
||||||
io,
|
io,
|
||||||
None
|
"aider",
|
||||||
"Install the latest version from the main branch?",
|
"Installing the latest version from the main branch...",
|
||||||
["--upgrade", "git+https://github.com/paul-gauthier/aider.git"],
|
["--upgrade", "git+https://github.com/paul-gauthier/aider.git"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue