From c6c311d55829d7543e69a1d007391c93dc5920fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 24 Jul 2011 19:41:13 +0100 Subject: [PATCH] Move definition of VERSION / DATE to preprocess.sh, so docs.sh works too. --- build/build.sh | 5 +---- build/docs.sh | 2 +- build/preprocess.sh | 5 ++++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/build.sh b/build/build.sh index 7cb5a831..0e0e409c 100755 --- a/build/build.sh +++ b/build/build.sh @@ -22,9 +22,6 @@ # compressed No comments and no whitespaces # uglified Uses UglifyJS to further reduce file size -VERSION=0.2 -DATE=$(git log -1 --pretty=format:%ad) - if [ $# -eq 0 ] then MODE="stripped" @@ -38,5 +35,5 @@ then mkdir ../dist/ fi -./preprocess.sh $MODE ../src/paper.js ../dist/paper.js "-DBROWSER -DVERSION=$VERSION -DDATE='$DATE'" +./preprocess.sh $MODE ../src/paper.js ../dist/paper.js "-DBROWSER" #./preprocess.sh $MODE ../src/paper.js ../dist/paper-server.js "-DSERVER" diff --git a/build/docs.sh b/build/docs.sh index 6b1933d0..e1425bba 100755 --- a/build/docs.sh +++ b/build/docs.sh @@ -33,6 +33,6 @@ cd .. if [ $MODE == "docs" ] then # Build paper.js library for documentation - ./preprocess.sh stripped ../src/paper.js ../dist/docs/resources/js/paper.js\ + ./preprocess.sh stripped ../src/paper.js ../dist/docs/resources/js/paper.js\ "-DBROWSER" fi diff --git a/build/preprocess.sh b/build/preprocess.sh index d6669022..2264acc1 100755 --- a/build/preprocess.sh +++ b/build/preprocess.sh @@ -32,8 +32,11 @@ # compressed No comments and no whitespaces # uglified Uses UglifyJS to further reduce file size +VERSION=0.2 +DATE=$(git log -1 --pretty=format:%ad) + KEYWORD="//#" -COMMAND="./filepp.pl -kc $KEYWORD $4 $2" +COMMAND="./filepp.pl -kc $KEYWORD $4 -DVERSION=$VERSION -DDATE='$DATE' $2" case $1 in stripped)