X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=buildSite.sh;h=7992e7448aa6458f687b65cc92633f60adfb0a0b;hb=6ff6222c599bc868cf9675f4983c40da86c8c1f7;hp=aa539868350a476870ee510df95fccbf0815a920;hpb=ca8bc22e6a10064ce9917e0c5a3739d01b9a0085;p=gpl%2Fargeo-slc.git diff --git a/buildSite.sh b/buildSite.sh index aa5398683..7992e7448 100755 --- a/buildSite.sh +++ b/buildSite.sh @@ -12,22 +12,34 @@ PROFILES=$1 BUILD_DIR=`pwd` HOSTNAME=`hostname -f` DATE=`date -u` +EXIT_STATUS=0 -# BUILD -mvn --fail-at-end deploy -P$PROFILES 2>&1 | tee deploy.log +export MAVEN_OPTS=-Xmx256m +export PATH=$PATH:/usr/local/bin -if [ $? != 0 ] ; then - mail -s "Build@$HOSTNAME FAILURE - $DATE - $BUILD_DIR" $TO < deploy.log -else +# BUILD +/usr/local/bin/mvn -up --fail-at-end deploy $PROFILES 2>&1 | tee deploy.log +EXIT_STATUS=$PIPESTATUS +if [ $EXIT_STATUS -eq 0 ] +then mail -s "Build@$HOSTNAME SUCCESS - $DATE - $BUILD_DIR" $TO < pom.xml +else + mail -s "Build@$HOSTNAME FAILURE - $DATE - $BUILD_DIR" $TO < deploy.log fi -# SITE -mvn --fail-at-end site-deploy -P$PROFILES 2>&1 | tee siteGeneration.log +# SDK +#cd dist/org.argeo.slc.sdk +#/usr/local/bin/mvn deploy +#cd ../.. -if [ $? != 0 ] ; then - mail -s "SiteGeneration@$HOSTNAME FAILURE - $DATE - $BUILD_DIR" $TO < siteGeneration.log +# SITE +/usr/local/bin/mvn -up --fail-at-end site-deploy $PROFILES 2>&1 | tee siteGeneration.log +if [ $PIPESTATUS -eq 0 ] +then + echo No need to send email for successful site generation else - # No need to send email for successful site generation + mail -s "SiteGeneration@$HOSTNAME FAILURE - $DATE - $BUILD_DIR" $TO < siteGeneration.log fi + +exit $EXIT_STATUS