Mercurial Hosting > luan
changeset 307:4bf49f0a46b3
improve build process
git-svn-id: https://luan-java.googlecode.com/svn/trunk@308 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Tue, 23 Dec 2014 05:28:51 +0000 |
parents | 7f38793a99ee |
children | 869d2263de5d |
files | core/src/luan/version.luan dist/jars/luan-core-trunk.jar dist/jars/luan-logging-trunk.jar dist/jars/luan-lucene-trunk.jar dist/jars/luan-mail-trunk.jar dist/jars/luan-web-trunk.jar dist/scripts/build-luan.sh dist/scripts/luan-classpath.sh dist/scripts/luan-dev-classpath.sh dist/scripts/luan-ext-classpath.sh dist/scripts/luan.sh dist/scripts/tar-luan.sh dist/scripts/uninstall.sh |
diffstat | 13 files changed, 52 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/core/src/luan/version.luan Mon Dec 22 08:27:08 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -_G._VERSION = 'Luan trunk'
--- a/dist/scripts/build-luan.sh Mon Dec 22 08:27:08 2014 +0000 +++ b/dist/scripts/build-luan.sh Tue Dec 23 05:28:51 2014 +0000 @@ -1,10 +1,24 @@ -VERSION=trunk +VERSION=`svnversion` + +if echo $VERSION | grep : +then + echo "svn update needed" + exit 1 +fi + + +LUAN_BUILD=~/luanbuild . check_luan_home.sh +set -e + +rm -rf $LUAN_BUILD +mkdir $LUAN_BUILD +mkdir $LUAN_BUILD/luan +mkdir $LUAN_BUILD/luan/jars + cd $LUAN_HOME -rm dist/jars/*.jar -set -e echo "_G._VERSION = 'Luan $VERSION'" >core/src/luan/version.luan cd $LUAN_HOME @@ -12,7 +26,7 @@ CLASSPATH=$LUAN_HOME/$SRC javac -classpath $CLASSPATH `find $SRC -name *.java` cd $SRC -jar cvf $LUAN_HOME/dist/jars/luan-core-$VERSION.jar `find . -name *.class -o -name *.luan` +jar cvf $LUAN_BUILD/luan/jars/luan-core-$VERSION.jar `find . -name *.class -o -name *.luan` cd $LUAN_HOME SRC=web/src @@ -20,7 +34,7 @@ for i in $LUAN_HOME/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done javac -classpath $CLASSPATH `find $SRC -name *.java` cd $SRC -jar cvf $LUAN_HOME/dist/jars/luan-web-$VERSION.jar `find . -name *.class -o -name *.luan` +jar cvf $LUAN_BUILD/luan/jars/luan-web-$VERSION.jar `find . -name *.class -o -name *.luan` cd $LUAN_HOME SRC=logging/src @@ -28,7 +42,7 @@ for i in $LUAN_HOME/logging/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done javac -classpath $CLASSPATH `find $SRC -name *.java` cd $SRC -jar cvf $LUAN_HOME/dist/jars/luan-logging-$VERSION.jar `find . -name *.class -o -name *.luan` +jar cvf $LUAN_BUILD/luan/jars/luan-logging-$VERSION.jar `find . -name *.class -o -name *.luan` cd $LUAN_HOME SRC=mail/src @@ -36,7 +50,7 @@ for i in $LUAN_HOME/mail/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done javac -classpath $CLASSPATH `find $SRC -name *.java` cd $SRC -jar cvf $LUAN_HOME/dist/jars/luan-mail-$VERSION.jar `find . -name *.class -o -name *.luan` +jar cvf $LUAN_BUILD/luan/jars/luan-mail-$VERSION.jar `find . -name *.class -o -name *.luan` cd $LUAN_HOME SRC=lucene/src @@ -44,4 +58,16 @@ for i in $LUAN_HOME/lucene/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done javac -classpath $CLASSPATH `find $SRC -name *.java` cd $SRC -jar cvf $LUAN_HOME/dist/jars/luan-lucene-$VERSION.jar `find . -name *.class -o -name *.luan` +jar cvf $LUAN_BUILD/luan/jars/luan-lucene-$VERSION.jar `find . -name *.class -o -name *.luan` + +cp $LUAN_HOME/web/ext/* $LUAN_BUILD/luan/jars +cp $LUAN_HOME/logging/ext/* $LUAN_BUILD/luan/jars +cp $LUAN_HOME/mail/ext/* $LUAN_BUILD/luan/jars +cp $LUAN_HOME/lucene/ext/* $LUAN_BUILD/luan/jars + +cp $LUAN_HOME/dist/scripts/install.sh $LUAN_BUILD/luan +chmod +x $LUAN_BUILD/luan/install.sh +cp $LUAN_HOME/dist/scripts/uninstall.sh $LUAN_BUILD/luan + +cd $LUAN_BUILD +tar -cf luan-$VERSION.tar luan
--- a/dist/scripts/luan-classpath.sh Mon Dec 22 08:27:08 2014 +0000 +++ b/dist/scripts/luan-classpath.sh Tue Dec 23 05:28:51 2014 +0000 @@ -1,3 +1,14 @@ -for i in $LUAN_HOME/dist/jars/* ; do CLASSPATH=$CLASSPATH:$i ; done +. check_luan_home.sh -. luan-ext-classpath.sh +CLASSPATH=$LUAN_HOME/core/src +CLASSPATH=$CLASSPATH:$LUAN_HOME/web/src +CLASSPATH=$CLASSPATH:$LUAN_HOME/logging/src +CLASSPATH=$CLASSPATH:$LUAN_HOME/mail/src +CLASSPATH=$CLASSPATH:$LUAN_HOME/lucene/src + +for i in $LUAN_HOME/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +for i in $LUAN_HOME/logging/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +for i in $LUAN_HOME/mail/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +for i in $LUAN_HOME/lucene/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done + +export CLASSPATH
--- a/dist/scripts/luan-dev-classpath.sh Mon Dec 22 08:27:08 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -CLASSPATH=~/luan/core/src -CLASSPATH=$CLASSPATH:~/luan/web/src -CLASSPATH=$CLASSPATH:~/luan/logging/src -CLASSPATH=$CLASSPATH:~/luan/mail/src -CLASSPATH=$CLASSPATH:~/luan/lucene/src - -. luan-ext-classpath.sh - -export CLASSPATH
--- a/dist/scripts/luan-ext-classpath.sh Mon Dec 22 08:27:08 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -for i in $LUAN_HOME/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done -for i in $LUAN_HOME/logging/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done -for i in $LUAN_HOME/mail/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done -for i in $LUAN_HOME/lucene/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done
--- a/dist/scripts/luan.sh Mon Dec 22 08:27:08 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -. check_luan_home.sh - -. luan-classpath.sh - -java -classpath $CLASSPATH luan.Luan $*
--- a/dist/scripts/tar-luan.sh Mon Dec 22 08:27:08 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -. check_luan_home.sh - -rm -rf $LUAN_HOME/tar - -mkdir $LUAN_HOME/tar -mkdir $LUAN_HOME/tar/luan -mkdir $LUAN_HOME/tar/luan/jars - -cp $LUAN_HOME/dist/jars/* $LUAN_HOME/tar/luan/jars -cp $LUAN_HOME/web/ext/* $LUAN_HOME/tar/luan/jars -cp $LUAN_HOME/logging/ext/* $LUAN_HOME/tar/luan/jars -cp $LUAN_HOME/mail/ext/* $LUAN_HOME/tar/luan/jars -cp $LUAN_HOME/lucene/ext/* $LUAN_HOME/tar/luan/jars - -cp $LUAN_HOME/dist/scripts/install.sh $LUAN_HOME/tar/luan -chmod +x $LUAN_HOME/tar/luan/install.sh - -cd $LUAN_HOME/tar -tar -cf luan.tar luan -mv luan.tar ~/Dropbox/luan - -rm -r $LUAN_HOME/tar