From 169555f2be20edf392e873e60b80caae5fc38115 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 12 Feb 2013 15:31:30 +0100 Subject: [PATCH] Use ifind rather than glob to work around Windows path separator nonsense --- build.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index 2cf4a2ee5d..a416c6c117 100755 --- a/build.py +++ b/build.py @@ -1,10 +1,10 @@ #!/usr/bin/env python from cStringIO import StringIO -import glob import gzip import json import os +import os.path import re import shutil import sys @@ -42,9 +42,14 @@ EXTERNAL_SRC = [ 'build/src/external/src/types.js'] EXAMPLES = [path - for path in glob.glob('examples/*.html') + for path in ifind('examples') + if not path.startswith('examples/standalone/') + if path.endswith('.html') if path != 'examples/example-list.html'] +EXAMPLES_JSON = [example.replace('.html', '.json') + for example in EXAMPLES] + EXAMPLES_SRC = [path for path in ifind('examples') if path.endswith('.js') @@ -195,7 +200,7 @@ def examples_star_combined_js(name, match): @target('serve', PLOVR_JAR, INTERNAL_SRC, 'test/requireall.js', 'examples') def serve(t): - t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve', glob.glob('build/*.json'), glob.glob('examples/*.json'), glob.glob('test/*.json')) + t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve', 'build/ol.json', 'build/ol-all.json', EXAMPLES_JSON, 'test/test.json') @target('serve-precommit', PLOVR_JAR, INTERNAL_SRC)