https://github.com/web-platform-tests/wpt
Raw File
Tip revision: e05234ad84e251d939a0b71754b23b6b5392ad8b authored by moz-wptsync-bot on 14 March 2018, 18:17:10 UTC
Make slot assignment sound with layout after bug 1409975.
Tip revision: e05234a
update_manifest.py
import imp
import json
import os
import sys

here = os.path.dirname(__file__)
localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py")))

root = localpaths.repo_root

from manifest import manifest, update

def main(request, response):
    path = os.path.join(root, "MANIFEST.json")

    manifest_file = None
    try:
        manifest_file = manifest.load(root, path)
    except manifest.ManifestVersionMismatch:
        pass
    if manifest_file is None:
        manifest_file = manifest.Manifest("/")

    update.update(root, manifest_file)

    manifest.write(manifest_file, path)

    return [("Content-Type", "application/json")], json.dumps({"url": "/MANIFEST.json"})
back to top