#!/bin/bash ########################################################################### # # Copyright (c) 2021-2024 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 alarmMapping.sh # # @author (last) Behrouz NematiPour # @date (last) 04-Oct-2022 # @author (original) Behrouz NematiPour # @date (original) 11-May-2021 # ############################################################################ alarmMapping=./alarmMapping BRANCH=$(git symbolic-ref --short HEAD) if ( test -n "$1" ); then BRANCH="$1" fi echo "update the common repo" pushd $FOLDER_PROJECT/common if ( test -d .git ); then git checkout $BRANCH git pull fi popd if ! ( test -x $alarmMapping ); 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" $alarmMapping \ $FOLDER_PROJECT/common/ \ $FOLDER_PROJECT/sources/model/hd/alarm/ \ 2> $FOLDER_ALARMS/alarmMapping.err \ | tee $FOLDER_ALARMS/alarmMapping.log mv ./AlarmMapping.csv $FOLDER_ALARMS mv ./AlarmMapping.py $FOLDER_ALARMS