PagerMaid-Pyro/pagermaid/common/update.py
2023-02-01 00:24:56 +08:00

13 lines
398 B
Python

from sys import executable
from pagermaid.utils import execute
async def update(force: bool = False):
await execute('git fetch --all')
if force:
await execute('git reset --hard origin/master')
await execute('git pull --all')
await execute(f"{executable} -m pip install --upgrade -r requirements.txt")
await execute(f"{executable} -m pip install -r requirements.txt")