From 1d64dcc47323ca474d300b3888f05625760cd519 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 Apr 2016 18:17:35 +0300 Subject: Check for error after most ci scripts. --- .tools/contributors.sh | 2 ++ .tools/deploy.sh | 3 +++ .tools/init.sh | 10 ++++++++++ .tools/testxml.sh | 1 + 4 files changed, 16 insertions(+) (limited to '.tools') diff --git a/.tools/contributors.sh b/.tools/contributors.sh index 313cf905..2fa95fff 100755 --- a/.tools/contributors.sh +++ b/.tools/contributors.sh @@ -11,6 +11,8 @@ gitclone https://gitlab.com/evol/evol-tools.git tools cd tools/contrib_xsl make about-server +check_error + cd ../../clientdata export RES=$(git diff) diff --git a/.tools/deploy.sh b/.tools/deploy.sh index 786062ca..b5449f6e 100755 --- a/.tools/deploy.sh +++ b/.tools/deploy.sh @@ -20,11 +20,14 @@ gitclone https://gitlab.com/evol/evol-music.git music cd tools/update ./createnew.sh +check_error ./create_music.sh +check_error cp -r upload/* ../../clientdata/public cd ../../clientdata gitclone https://gitlab.com/4144/pagesindexgen.git pagesindexgen cd pagesindexgen ./pagesindexgen.py ../public +check_error ls ../public diff --git a/.tools/init.sh b/.tools/init.sh index e1073e02..a2bda610 100755 --- a/.tools/init.sh +++ b/.tools/init.sh @@ -1,5 +1,11 @@ #!/bin/bash +function check_error { + if [ "$1" != 0 ]; then + exit $result + fi +} + function gitclone { git clone $* if [ "$?" != 0 ]; then @@ -10,6 +16,7 @@ function gitclone { git clone $* fi fi + check_error } function aptget_update { @@ -22,6 +29,7 @@ function aptget_update { apt-get update fi fi + check_error } function aptget_install { @@ -34,10 +42,12 @@ function aptget_install { apt-get -y -qq install $* fi fi + check_error } function clientdata_init { mkdir shared cd .. ln -s clientdata client-data + check_error } diff --git a/.tools/testxml.sh b/.tools/testxml.sh index 2b8b20d8..c56dbd6f 100755 --- a/.tools/testxml.sh +++ b/.tools/testxml.sh @@ -11,6 +11,7 @@ gitclone https://gitlab.com/evol/evol-tools.git tools cd tools/testxml ./xsdcheck.sh +check_error export RES=$(cat errors.txt) if [[ -n "${RES}" ]]; then echo "xml check failed" >../../clientdata/shared/error.log -- cgit v1.2.3-60-g2f50