Index: alarmMapping.sh =================================================================== diff -u -r3f555c49ddd2c983f469709e3c001d0e76159248 -r86acb3c49bfc7c4ed8fc860d895c0603b4816b3a --- alarmMapping.sh (.../alarmMapping.sh) (revision 3f555c49ddd2c983f469709e3c001d0e76159248) +++ alarmMapping.sh (.../alarmMapping.sh) (revision 86acb3c49bfc7c4ed8fc860d895c0603b4816b3a) @@ -1,29 +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 -../scripts/build/alarmMapping \ - common/AlarmDefs.h \ - sources/model/hd/alarm/MAlarmMapping.cpp \ - 1> alarmMapping.log \ - 2> alarmMapping.err +echo "update the alarm message mapping" +$ALARM_MAPPING \ + common/ \ + sources/model/hd/alarm/ \ + 2> alarmMapping.err \ + | tee alarmMapping.log -cp ../scripts/build/AlarmMapping.csv . +echo "move the Alarm code mapping to current location(./)" +mv ../scripts/build/AlarmMapping.csv . +