Testing. remove spaces from branch-name

This commit is contained in:
Gerhard Hoffmann 2023-05-25 15:13:07 +02:00
parent 5939060c69
commit b6137a41f2

View File

@ -8,7 +8,7 @@ readonly update_log_file="/opt/app/tools/atbupdate/update_log.csv"
if [ -f $ch_file ]; then
readonly repo=$(basename $(git rev-parse --show-toplevel))
readonly branch=$(git log --graph --all --decorate $2 | head -n 1 | sed -E -e 's/(.*?)(\(.*\))/\2/g')
readonly branch=$(git log --graph --all --decorate $2 | head -n 1 | sed -E -e 's/(.*?)\((.*)\)/\2/g' | sed -E -e s/[[:space:]]//g)
line="$repo:$branch"
echo "line=$line"
if ! grep -Eq "$line" $ch_file; then