예제 #1
0
def run_sphinx_build():
    sh("python3", "-m", "venv", "env")
    sh("env/bin/pip", "install", "-r", "requirements.txt")
    sh("env/bin/sphinx-build", "-b", "dirhtml", "..", "_build")
    clean_all_except(["_build"])
    copytree("_build", ".", dirs_exist_ok=True)
    rmtree("_build")
예제 #2
0
def run_61a_website_build():
    env = dict(CLOUD_STORAGE_BUCKET="website-pdf-cache.buckets.cs61a.org", )

    def build(target):
        # need to re-run make for stupid reasons
        out = sh(
            "make",
            "--no-print-directory",
            "-C",
            "src",
            target,
            env=env,
            capture_output=True,
        )
        print(out.decode("utf-8", "replace"))

    build("all")
    sh("cp", "-aT", "published", "released")
    build("unreleased")
    sh("cp", "-aT", "published", "unreleased")
    clean_all_except(["released", "unreleased"])
예제 #3
0
def run_create_react_app_build():
    sh("yarn")
    sh("yarn", "build")
    clean_all_except(["deploy"])
    copytree("deploy", ".", dirs_exist_ok=True)
    rmtree("deploy")
예제 #4
0
def run_jekyll_build():
    sh("bundle", "install")
    sh("bundle", "exec", "jekyll", "build")
    clean_all_except(["_site"])
    copytree("_site", ".", dirs_exist_ok=True)
    rmtree("_site")
예제 #5
0
def run_hugo_build():
    sh("python", "make_content.py")
    sh("hugo")
    clean_all_except(["public"])
    copytree("public", ".", dirs_exist_ok=True)
    rmtree("public")