activejdbc is stupid...

This commit is contained in:
overflowerror 2018-07-14 23:21:02 +02:00
parent ca318c3da1
commit 6ab4317e5e
2 changed files with 23 additions and 12 deletions

View file

@ -16,11 +16,12 @@ mkdir -p ../build/NurseBot_lib/
pushd ../src/ pushd ../src/
for file in $(ls ../build/NurseBot_lib); do for file in $(ls ../build/NurseBot_lib); do
echo "found lib: $file"
export CLASSPATH=$CLASSPATH:../build/NurseBot_lib/$file export CLASSPATH=$CLASSPATH:../build/NurseBot_lib/$file
done done
echo "Building... " echo "Building... "
javac -cp "$CLASSPATH" -d ../bin/ $(find ./ -iname "*.java") javac -cp $CLASSPATH -d ../bin/ $(find ./ -iname "*.java")
if test ! $? = 0; then if test ! $? = 0; then
echo "... failed" echo "... failed"
exit $EXIT_COMPILE_FAILED exit $EXIT_COMPILE_FAILED
@ -29,17 +30,7 @@ echo "... done"
popd popd
pushd ../bin/ pushd ../buildtools/
echo "Packing jar..."
jar cmf ../buildtools/MANIFEST.MF ../build/NurseBot.jar $(find ./ -iname "*.class")
if test ! $? = 0; then
echo "... failed"
exit $EXIT_PACKING_FAILED
fi
echo "... done"
popd
echo "Building instrumentation..." echo "Building instrumentation..."
./instrumentation.sh ./instrumentation.sh
@ -57,7 +48,22 @@ if test ! $? = 0; then
fi fi
echo "... done" echo "... done"
popd
pushd ../bin/
echo "Packing jar..."
jar cmf ../buildtools/MANIFEST.MF ../build/NurseBot.jar $(find ./ -iname "*.class")
if test ! $? = 0; then
echo "... failed"
exit $EXIT_PACKING_FAILED
fi
echo "... done"
popd
pushd ../build pushd ../build
echo "Determine version..." echo "Determine version..."
version=$(java -jar NurseBot.jar -v) version=$(java -jar NurseBot.jar -v)
echo "This is version $version." echo "This is version $version."
@ -65,6 +71,7 @@ echo "This is version $version."
if test ! "$DEPLOY" = ""; then if test ! "$DEPLOY" = ""; then
echo "Set to deploy ($DEPLOY/$VERSIONS/NurseBot$version.jar) echo "Set to deploy ($DEPLOY/$VERSIONS/NurseBot$version.jar)
..." ..."
cp activejdbc_models.properties $DEPLOY/$VERSIONS/activejdbc_models$version.properties
cp NurseBot.jar $DEPLOY/$VERSIONS/NurseBot$version.jar cp NurseBot.jar $DEPLOY/$VERSIONS/NurseBot$version.jar
if test ! $? = 0; then if test ! $? = 0; then
echo "... failed" echo "... failed"

View file

@ -8,12 +8,16 @@ VERSION=$2
pushd $DEPLOY_DIR pushd $DEPLOY_DIR
file=$VERSIONS/NurseBot$VERSION.jar file=$VERSIONS/NurseBot$VERSION.jar
models=$VERSIONS/activejdbc_models$VERSION.properties
if test ! -f $file; then if test ! -f $file; then
echo "Version not found." echo "Version not found."
exit 1 exit 1
fi fi
unlink activejdbc_models.properties
ln $models activejdbc_models.properties
unlink NurseBot.jar unlink NurseBot.jar
ln $file NurseBot.jar ln $file NurseBot.jar