From f772fd248475c3510529335ca0f2948fd66666ea Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Sat, 6 Jun 2009 21:35:29 +0000 Subject: [PATCH] Improve build script git-svn-id: https://svn.argeo.org/slc/trunk@2504 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- buildSite.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/buildSite.sh b/buildSite.sh index 60e393273..366a8d204 100755 --- a/buildSite.sh +++ b/buildSite.sh @@ -15,17 +15,17 @@ DATE=`date -u` # BUILD mvn --fail-at-end deploy -P$PROFILES 2>&1 | tee deploy.log -if [ $? != "0" ] ; then - mail -s "Build@$HOSTNAME FAILURE - $DATE - $BUILD_DIR" $TO < deploy.log -else +if [ $? 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 -if [ $? != 0 ] ; then - mail -s "SiteGeneration@$HOSTNAME FAILURE - $DATE - $BUILD_DIR" $TO < siteGeneration.log +if [ $? 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 -- 2.39.2