Run style with all properties enabled

This commit is contained in:
Manish Goregaokar 2016-09-23 09:40:16 +05:30
parent ee3f916b65
commit 919bf17e51
5 changed files with 19 additions and 6 deletions

View file

@ -18,15 +18,17 @@ import data
def main():
usage = "Usage: %s [ servo | gecko ] [ style-crate | html ]" % sys.argv[0]
if len(sys.argv) < 3:
usage = "Usage: %s [ servo | gecko ] [ style-crate | html ] [ testing | regular ]" % sys.argv[0]
if len(sys.argv) < 4:
abort(usage)
product = sys.argv[1]
output = sys.argv[2]
testing = sys.argv[3] == "testing"
if product not in ["servo", "gecko"] or output not in ["style-crate", "geckolib", "html"]:
abort(usage)
properties = data.PropertiesData(product=product)
properties = data.PropertiesData(product=product, testing=testing)
rust = render(os.path.join(BASE, "properties.mako.rs"), product=product, data=properties)
if output == "style-crate":
write(os.environ["OUT_DIR"], "properties.rs", rust)