PagerMaid-Pyro/pagermaid/common/update.py

13 lines
398 B
Python
Raw Normal View History

2023-01-31 16:24:56 +00:00
from sys import executable
from pagermaid.utils import execute
async def update(force: bool = False):
2023-03-12 03:56:01 +00:00
await execute("git fetch --all")
2023-01-31 16:24:56 +00:00
if force:
2023-03-12 03:56:01 +00:00
await execute("git reset --hard origin/master")
await execute("git pull --all")
2023-01-31 16:24:56 +00:00
await execute(f"{executable} -m pip install --upgrade -r requirements.txt")
await execute(f"{executable} -m pip install -r requirements.txt")