Index: alarmMapping.sh =================================================================== diff -u -r9ae3b0d6624904693329309aaf8ff02784c17184 -r86acb3c49bfc7c4ed8fc860d895c0603b4816b3a --- alarmMapping.sh (.../alarmMapping.sh) (revision 9ae3b0d6624904693329309aaf8ff02784c17184) +++ alarmMapping.sh (.../alarmMapping.sh) (revision 86acb3c49bfc7c4ed8fc860d895c0603b4816b3a) @@ -1,32 +1,49 @@ #!/bin/sh ########################################################################### # -# Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +# Copyright (c) 2021-2022 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # -# @file cppcheck.sh +# @file alarmMapping.sh # -# @author (last) Behrouz NematiPour -# @date (last) 11-May-2021 -# @author (original) Behrouz NematiPour -# @date (original) 11-May-2021 +# @author (last) Behrouz NematiPour +# @date (last) 22-Jun-022 +# @author (original) Behrouz NematiPour +# @date (original) 11-May-2021 # ############################################################################ -# update common repo +ALARM_MAPPING=../scripts/build/alarmMapping +BRANCH=$(git symbolic-ref --short HEAD) +if ( test -n "$1" ); then + BRANCH="$1" +fi + echo "update the common repo" cd common -git pull +if ( test -d .git ); then + git checkout $BRANCH + git pull +fi cd .. +if ! ( test -x $ALARM_MAPPING ); then + echo "Alarm Mapping tool doesn't exist. Continues by assuming the Alarm Table is updated." + # if return anything other than 0 build stops running next steps. + # it is ok for the dev_test to not to have the script folder and + # common folder not as a repository. + exit 0 +fi + # update the alarm messaging echo "update the alarm message mapping" -../scripts/build/alarmMapping \ - common/AlarmDefs.h \ - sources/model/hd/alarm/MAlarmMapping.cpp \ - 1> alarmMapping.log \ - 2> alarmMapping.err +$ALARM_MAPPING \ + common/ \ + sources/model/hd/alarm/ \ + 2> alarmMapping.err \ + | tee alarmMapping.log echo "move the Alarm code mapping to current location(./)" mv ../scripts/build/AlarmMapping.csv . +