From bb931c006fb63e70f5f57c661298d52dd0a9c922 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 31 Oct 2014 19:12:45 +0100 Subject: [PATCH] fix build without examples, version can contain more than numbers --- source/Ox/js/Constants.js | 2 +- tools/build/build.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Ox/js/Constants.js b/source/Ox/js/Constants.js index dff5f35c..8f88ca13 100644 --- a/source/Ox/js/Constants.js +++ b/source/Ox/js/Constants.js @@ -92,7 +92,7 @@ Ox.SHORT_MONTHS = Ox.MONTHS.map(function(val) { //@ Ox.PATH Path of Ox.js Ox.PATH = (function() { // IE8 can't apply slice to NodeLists, see Ox.slice - var index, regexp = /Ox\.js(\?\d+|)$/, + var index, regexp = /Ox\.js(\?.+|)$/, scripts = document.getElementsByTagName('script'), src; for (index = scripts.length - 1; index >= 0; index--) { src = scripts[index].src; diff --git a/tools/build/build.py b/tools/build/build.py index ec8efc29..bc94b023 100755 --- a/tools/build/build.py +++ b/tools/build/build.py @@ -257,7 +257,7 @@ def build_oxjs(downloads=False, geo=False): lambda x: not re.search('^[._]', x), os.listdir(root_path + 'examples/') )) - ), [])), + ), [])) if os.path.exists(root_path + 'examples/') else (), 'readme': list(map( lambda x: { 'date': time.strftime(