strolch/li.strolch.dev/buildMSE.sh

41 lines
913 B
Bash
Raw Normal View History

#!/bin/bash
2014-03-21 14:01:09 +01:00
VERVEINE="/data/programs/verveinej/verveinej.sh"
DIST_STROLCH="/var/www/eitch/www.strolch.li/dist/snapshot"
2014-03-21 14:01:09 +01:00
2014-09-17 09:50:16 +02:00
## Prepare the environment
2014-03-21 14:01:09 +01:00
echo "INFO Bootstrapping..."
if ! ./bootstrap_https.sh ; then
echo "ERROR: Failed to boostrap!"
exit 1
fi
echo "INFO: Copying dependencies"
2014-09-19 23:08:30 +02:00
cd ..
2014-03-21 14:01:09 +01:00
mvn -DskipTests=true clean dependency:copy-dependencies
echo "INFO Running verveinej..."
if ! ${VERVEINE} -- -autocp . . ; then
echo "ERROR: Failed to run verveinej!"
exit 1
fi
mv output.mse Strolch.mse
echo "INFO Cleaning sources..."
if ! mvn clean ; then
echo "ERROR: Failed to run mvn clean!"
exit 1
fi
echo "INFO Packaging..."
2014-09-17 09:53:23 +02:00
if ! tar --exclude="*/target" --exclude="*/.git*" -cvzf strolch_mse.tar.gz * ; then
2014-03-21 14:01:09 +01:00
echo "ERROR: Failed to build package!"
exit 1
fi
if ! mv strolch_mse.tar.gz ${DIST_STROLCH}/strolch_mse.tar.gz ; then
2014-03-21 14:01:09 +01:00
echo "ERROR: Failed to publish MSE file!"
exit 1
fi
exit 0