summaryrefslogtreecommitdiff
path: root/tools/ci/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ci/jobs')
-rwxr-xr-xtools/ci/jobs/deheader2.sh14
-rwxr-xr-xtools/ci/jobs/imagemagiccheck.sh5
-rwxr-xr-xtools/ci/jobs/nsiqcppstyle.sh24
-rwxr-xr-xtools/ci/jobs/pngcheck.sh4
4 files changed, 21 insertions, 26 deletions
diff --git a/tools/ci/jobs/deheader2.sh b/tools/ci/jobs/deheader2.sh
index 5862e555e..521f9266f 100755
--- a/tools/ci/jobs/deheader2.sh
+++ b/tools/ci/jobs/deheader2.sh
@@ -2,14 +2,12 @@
export LOGFILE2=logs/deheader2.log
-export DATA=$(cat ${LOGFILE})
-if [[ -z "${DATA}" ]]; then
+if [[ ! -s "$LOGFILE" ]]; then
echo "Empty output. Probably wrong search flags."
exit 1
fi
-export DATA=$(grep "error:" ${LOGFILE})
-if [[ -n "${DATA}" ]]; then
+if grep "error:" "$LOGFILE"; then
echo "Compilation error found"
exit 1
fi
@@ -31,9 +29,9 @@ grep "deheader:" "${LOGFILE}" \
-e "deheader: remove <climits> from ./src/units.cpp" \
> "${LOGFILE2}"
-export DATA=$(cat ${LOGFILE2})
-if [[ -n "${DATA}" ]]; then
- echo "Wrong include files found"
- echo ${DATA}
+
+if [[ -s "$LOGFILE2" ]]; then
+ echo "Wrong include files found:"
+ cat "$LOGFILE2"
exit 1
fi
diff --git a/tools/ci/jobs/imagemagiccheck.sh b/tools/ci/jobs/imagemagiccheck.sh
index 564026f1c..6d2e75060 100755
--- a/tools/ci/jobs/imagemagiccheck.sh
+++ b/tools/ci/jobs/imagemagiccheck.sh
@@ -10,9 +10,8 @@ rm ${LOG}
find -H $DIR -type f -name "*.png" -exec ./tools/ci/scripts/icccheckfile.sh {} \; >${LOG}
check_error $?
-export RES=$(cat ${LOG})
-if [[ -n "${RES}" ]]; then
- echo "Detected icc profiles"
+if [[ -s "$LOG" ]]; then
+ echo "Detected icc profiles:"
cat ${LOG}
exit 1
fi
diff --git a/tools/ci/jobs/nsiqcppstyle.sh b/tools/ci/jobs/nsiqcppstyle.sh
index a6db88cc9..d4a5dd449 100755
--- a/tools/ci/jobs/nsiqcppstyle.sh
+++ b/tools/ci/jobs/nsiqcppstyle.sh
@@ -14,20 +14,18 @@ rm -rf nsiqcppstyle.git
-e "/debug/" \
> logs/nsiqcppstyle1.log
-cat logs/nsiqcppstyle1.log \
- | grep -v -E \
- -e "gamemodifiers[.]cpp(.+): Incorrect align on long parameter list in front of '(N_|{|})'" \
- -e "graphics_calcImageRect[.]hpp(.+): function [(]calcTileVertexesInline[)] has non named parameter" \
- -e "dye[.]cpp(.+): Do not use goto keyword" \
- -e "item/item[.]cpp(.+): function [(]dragDrop[)] has non named parameter" \
- -e "windowmenu[.]cpp(.+): function [(]addButton[)] has non named parameter" \
- -e "windowmenu[.]cpp(.+): Incorrect align on long parameter list in front of '(.|Visible_true)', it should be aligen in column 15" \
- -e "channeltab[.]h(.+): Incorrect align on long parameter list in front of 'const'" \
- -e "/enums/simpletypes/(.+): function [(]defIntEnum[)] has non named parameter" \
- > "${ERRFILE}"
+grep -v -E \
+ -e "gamemodifiers[.]cpp(.+): Incorrect align on long parameter list in front of '(N_|{|})'" \
+ -e "graphics_calcImageRect[.]hpp(.+): function [(]calcTileVertexesInline[)] has non named parameter" \
+ -e "dye[.]cpp(.+): Do not use goto keyword" \
+ -e "item/item[.]cpp(.+): function [(]dragDrop[)] has non named parameter" \
+ -e "windowmenu[.]cpp(.+): function [(]addButton[)] has non named parameter" \
+ -e "windowmenu[.]cpp(.+): Incorrect align on long parameter list in front of '(.|Visible_true)', it should be aligen in column 15" \
+ -e "channeltab[.]h(.+): Incorrect align on long parameter list in front of 'const'" \
+ -e "/enums/simpletypes/(.+): function [(]defIntEnum[)] has non named parameter" \
+ logs/nsiqcppstyle1.log > "${ERRFILE}"
-export data=$(cat ${ERRFILE})
-if [ "$DATA" != "" ]; then
+if [[ -s "${ERRFILE}" ]]; then
echo "Warnings detected"
cat ${ERRFILE}
fi
diff --git a/tools/ci/jobs/pngcheck.sh b/tools/ci/jobs/pngcheck.sh
index 2fd0a18d5..e4effc2bf 100755
--- a/tools/ci/jobs/pngcheck.sh
+++ b/tools/ci/jobs/pngcheck.sh
@@ -11,8 +11,8 @@ rm ${LOG2}
find -H . -type f -name "*.png" -exec pngcheck {} \; >${LOG1}
grep -v "32-bit RGB+alpha, non-interlaced, " ${LOG1} >${LOG2}
-export DATA=$(cat pngcheck2.log)
-if [[ -n "${DATA}" ]]; then
+
+if [[ -s "$LOG2" ]]; then
echo "Images must be in 32 bit RGBA and non-interlanced"
echo "Wrong images format found:"
cat ${LOG2}