Move definition of VERSION / DATE to preprocess.sh, so docs.sh works too.

This commit is contained in:
Jürg Lehni 2011-07-24 19:41:13 +01:00
parent b37d4d9a9b
commit c6c311d558
3 changed files with 6 additions and 6 deletions

View file

@ -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"

View file

@ -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

View file

@ -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)