2020-01-04 00:16:07 +00:00
|
|
|
"""
|
|
|
|
Tasks for Bento4
|
|
|
|
"""
|
|
|
|
|
2021-06-13 02:33:26 +00:00
|
|
|
import subprocess
|
|
|
|
import os
|
|
|
|
from invoke import Collection, Config
|
2020-04-27 00:02:45 +00:00
|
|
|
from . import build
|
2020-01-06 06:27:59 +00:00
|
|
|
from . import docker
|
2021-06-13 02:33:26 +00:00
|
|
|
from . import doc
|
2020-01-06 06:27:59 +00:00
|
|
|
from . import test
|
2020-01-04 00:16:07 +00:00
|
|
|
|
2021-06-13 02:33:26 +00:00
|
|
|
GIT_DIR = subprocess.check_output("git rev-parse --show-toplevel",
|
|
|
|
shell=True).strip().decode("utf-8")
|
|
|
|
ROOT_DIR = GIT_DIR
|
|
|
|
|
2020-01-06 06:27:59 +00:00
|
|
|
# Add collections
|
|
|
|
ns = Collection()
|
2020-04-27 00:02:45 +00:00
|
|
|
ns.add_collection(build)
|
2020-01-06 06:27:59 +00:00
|
|
|
ns.add_collection(docker)
|
2021-06-13 02:33:26 +00:00
|
|
|
ns.add_collection(doc)
|
2020-04-27 00:02:45 +00:00
|
|
|
ns.add_collection(test)
|
2021-06-13 02:33:26 +00:00
|
|
|
|
|
|
|
# Setup the configuration
|
|
|
|
config = Config(project_location=ROOT_DIR)
|
|
|
|
config.C = {}
|
|
|
|
config.C.ROOT_DIR = ROOT_DIR
|
|
|
|
config.C.DOC_DIR = os.path.join(ROOT_DIR, "Documents")
|
|
|
|
|
|
|
|
ns.configure(config)
|