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-12-21 04:44:29 +01:00
|
|
|
|
2020-11-02 11:39:42 +01:00
|
|
|
@click.group()
|
|
|
|
def cli():
|
|
|
|
pass
|
|
|
|
|
2020-12-21 04:44:29 +01:00
|
|
|
|
2020-11-02 11:39:42 +01:00
|
|
|
cli.add_command(compile.cli, "compile")
|
|
|
|
|
|
|
|
print("Updating deps...")
|
2021-10-23 00:47:29 +02:00
|
|
|
os.chdir(os.getenv("BUILD_WORKING_DIRECTORY"))
|
2021-10-04 06:47:28 +02:00
|
|
|
sys.argv[1:] = [
|
|
|
|
"compile",
|
|
|
|
"--allow-unsafe",
|
|
|
|
"--upgrade",
|
|
|
|
"--no-header",
|
|
|
|
"--strip-extras",
|
2021-11-05 06:02:48 +01:00
|
|
|
"--generate-hashes",
|
2021-12-03 09:49:13 +01:00
|
|
|
"requirements.in",
|
2021-10-04 06:47:28 +02:00
|
|
|
]
|
2020-11-02 11:39:42 +01:00
|
|
|
|
2021-01-04 04:17:26 +01:00
|
|
|
cli()
|