changeset 1296:040c98e1f837

simplify build
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 10 Jan 2019 22:23:58 -0700
parents 9dca1e912658
children 5bd49896a7ce
files .hgignore scripts/build-luan.sh scripts/version.sh
diffstat 3 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
diff -r 9dca1e912658 -r 040c98e1f837 .hgignore
--- a/.hgignore	Thu Jan 10 21:42:11 2019 -0700
+++ b/.hgignore	Thu Jan 10 22:23:58 2019 -0700
@@ -4,7 +4,6 @@
 *.class
 err
 build
-version.luan
 *.bck
 *.n
 go
diff -r 9dca1e912658 -r 040c98e1f837 scripts/build-luan.sh
--- a/scripts/build-luan.sh	Thu Jan 10 21:42:11 2019 -0700
+++ b/scripts/build-luan.sh	Thu Jan 10 22:23:58 2019 -0700
@@ -2,9 +2,6 @@
 
 cd `dirname $0`/..
 
-VERSION=`scripts/version.sh`
-echo "return '$VERSION'" >src/luan/version.luan
-
 rm -rf build
 mkdir -p build/luan/jars
 
@@ -12,7 +9,7 @@
 
 . classpath.sh
 javac -classpath $CLASSPATH `find src -name *.java`
-cd src; jar cvf ../build/luan/jars/luan-$VERSION.jar `find . -name *.class -o -name *.luan`; cd ..
+cd src; jar cvf ../build/luan/jars/luan.jar `find . -name *.class -o -name *.luan`; cd ..
 cp lib/* build/luan/jars
 
 cp scripts/install.sh build/luan
@@ -20,6 +17,7 @@
 cp scripts/uninstall.sh build/luan
 
 cd build
+VERSION=`java -classpath $CLASSPATH luan.Luan classpath:luan/version.luan`
 tar -cf luan-$VERSION.tar luan
 
 luan/install.sh
diff -r 9dca1e912658 -r 040c98e1f837 scripts/version.sh
--- a/scripts/version.sh	Thu Jan 10 21:42:11 2019 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-echo '0.22'