anki/python/update.py

30 lines
498 B
Python
Raw Normal View History

2021-04-13 10:45:05 +02:00
# Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
2020-11-02 11:39:42 +01:00
import os
2021-04-14 10:22:02 +02:00
import sys
2020-11-02 11:39:42 +01:00
import click
from piptools.scripts import compile
2020-11-02 11:39:42 +01:00
@click.group()
def cli():
pass
2020-11-02 11:39:42 +01:00
cli.add_command(compile.cli, "compile")
print("Updating deps...")
os.chdir(os.getenv("BUILD_WORKING_DIRECTORY"))
sys.argv[1:] = [
"compile",
"--allow-unsafe",
"--upgrade",
"--no-header",
"--strip-extras",
"--generate-hashes"
]
2020-11-02 11:39:42 +01:00
cli()