From a1fcb4e065406e1f3d9d74ee98b64d7ca7c123be Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 23 Jun 2012 13:55:06 +0200 Subject: [PATCH] Build with an arbitrary configuration. --- bin/build.xml | 22 +++++++++++++++++----- bin/ol | 7 ++++++- bin/ol.cmd | 5 ++++- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/bin/build.xml b/bin/build.xml index 5cf52b6b16..5c51c4a784 100644 --- a/bin/build.xml +++ b/bin/build.xml @@ -8,15 +8,15 @@ - + Available commands: serve - Run the library server - api - Builds the optimized file with public api - doc - Build the reference docs + build - Builds a minified version of the library or an application + doc - Generate the reference docs @@ -36,10 +36,22 @@ - + + + + + + + + + + + + + - + diff --git a/bin/ol b/bin/ol index e764baa5e3..67da0eea80 100755 --- a/bin/ol +++ b/bin/ol @@ -36,4 +36,9 @@ else fi -ant -e -f "$OL_HOME/bin/build.xml" -Dol.home="$OL_HOME" $1 +ANT_ARGS="" +if [ $# -gt 1 ]; then + ANT_ARGS=-Dbuild.json="$2" +fi + +ant -e -f "$OL_HOME/bin/build.xml" -Dbasedir=. -Dol.home="$OL_HOME" $1 $ANT_ARGS diff --git a/bin/ol.cmd b/bin/ol.cmd index 6d8eba6e2e..3b38c12aea 100644 --- a/bin/ol.cmd +++ b/bin/ol.cmd @@ -15,4 +15,7 @@ popd set COMMAND="%~1" if "%~1" == "" set COMMAND="usage" -ant -e -f %OL_HOME%\bin\build.xml -Dol.home=%OL_HOME% -Dbasedir=. %COMMAND% +set ANT_ARGS= +if "%~2" == "" set ANT_ARGS="-Dbuild.json=%~2" + +ant -e -f %OL_HOME%\bin\build.xml -Dol.home=%OL_HOME% -Dbasedir=. %COMMAND% %ANT_ARGS%