mirror of
https://gitlab.com/spaceti-app/integrations/common/server-sdk.git
synced 2026-07-12 16:40:49 +02:00
fixing scripts ( not emmiting error when error )
fixed also cppcheck ( missing includes )
This commit is contained in:
parent
9fbf448eeb
commit
c6a8bf75e4
@ -7,4 +7,7 @@ SUBDIRS += \
|
|||||||
|
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
.gitlab-ci.yml
|
.gitlab-ci.yml \
|
||||||
|
scripts/* \
|
||||||
|
doc/Doxy* \
|
||||||
|
doc/pages/* \
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# @see https://intoli.com/blog/exit-on-errors-in-bash-scripts/
|
# @see https://intoli.com/blog/exit-on-errors-in-bash-scripts/
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; else pass "finished";fi' EXIT
|
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; exit 1; else pass "finished";fi' EXIT
|
||||||
|
|
||||||
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
DIRNAME="${SRCDIR##*/}"
|
DIRNAME="${SRCDIR##*/}"
|
||||||
|
|||||||
@ -3,17 +3,18 @@
|
|||||||
# @see https://intoli.com/blog/exit-on-errors-in-bash-scripts/
|
# @see https://intoli.com/blog/exit-on-errors-in-bash-scripts/
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; else pass "finished";fi' EXIT
|
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; exit 1; else pass "finished";fi' EXIT
|
||||||
|
|
||||||
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
DIRNAME="${SRCDIR##*/}"
|
DIRNAME="${SRCDIR##*/}"
|
||||||
|
|
||||||
exclude_dir=build
|
exclude_dir=build
|
||||||
check_dir=$SRCDIR/../src
|
check_dir=$SRCDIR/../src
|
||||||
|
suppress="--suppress=missingInclude --suppress=unusedFunction"
|
||||||
|
|
||||||
FAIL=0
|
FAIL=0
|
||||||
main() {
|
main() {
|
||||||
{ ERROR="$( { cppcheck $check_dir --suppress=missingIncludeSystem --suppress=unusedFunction --enable=all -i $exclude_dir; } 2>&1 1>&3 3>&- )"; } 3>&1;
|
{ ERROR="$( { cppcheck $check_dir $suppress --enable=all -i $exclude_dir; } 2>&1 1>&3 3>&- )"; } 3>&1;
|
||||||
|
|
||||||
if [ ! -z "$ERROR" ]; then
|
if [ ! -z "$ERROR" ]; then
|
||||||
echo "----------------------------------"
|
echo "----------------------------------"
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# @see https://intoli.com/blog/exit-on-errors-in-bash-scripts/
|
# @see https://intoli.com/blog/exit-on-errors-in-bash-scripts/
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; else pass "finished";fi' EXIT
|
trap 'LASTRES=$?; LAST=$BASH_COMMAND; if [[ LASTRES -ne 0 ]]; then fail "Command: \"$LAST\" exited with exit code: $LASTRES"; elif [ "$FAIL" -eq "1" ]; then fail finished with error; exit 1; else pass "finished";fi' EXIT
|
||||||
|
|
||||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
DIR_NAME="${CURRENT_DIR##*/}"
|
DIR_NAME="${CURRENT_DIR##*/}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user