Update pretty formatting of tools/check_changes.sh 51/14151/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 16 Jan 2024 14:15:15 +0000 (15:15 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 16 Jan 2024 14:15:15 +0000 (15:15 +0100)
Change-Id: I05eb4a7e31c05122c5dba7aaf700805746f46600
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
tools/check_changes.sh

index 6671aa1..09bd65b 100755 (executable)
@@ -34,7 +34,7 @@ echo "Changes in branch ${BRANCH} from ${FROM_REF} to ${TO_REF} stored in ${OSM_
 
 #trap 'rm -rf "${OSM_CHANGES_FOLDER}"' EXIT
 
-touch "${OSM_CHANGES_FOLDER}/osm_changes-${BRANCH}-from${FROM_REF}-to${TO_REF}.log"
+echo "-----------------------------------------" > "${OSM_CHANGES_FOLDER}/osm_changes-${BRANCH}-from${FROM_REF}-to${TO_REF}.log"
 
 modules="common devops IM LCM MON N2VC NBI NG-SA NG-UI osmclient RO PLA POL SOL003 SOL005 tests"
 for repo in $modules; do
@@ -43,12 +43,12 @@ for repo in $modules; do
     git -C ${OSM_CHANGES_FOLDER}/$repo checkout ${BRANCH}
 
     # Print changes in the module changelog
-    git -C ${OSM_CHANGES_FOLDER}/$repo log --pretty=format:"%C(yellow)%h %Cblue%ad %Cgreen%>(13,trunc)%an%Cred%d %Creset%s" --date=short ${FROM_REF}..${TO_REF} > "${OSM_CHANGES_FOLDER}/${repo}_changes-${BRANCH}-from${FROM_REF}-to${TO_REF}.log"
+    git -C ${OSM_CHANGES_FOLDER}/$repo log --pretty=format:"%C(yellow)%h %Cblue%ad %Cgreen%>(13,trunc)%an %Creset%s" --date=short ${FROM_REF}..${TO_REF} > "${OSM_CHANGES_FOLDER}/${repo}_changes-${BRANCH}-from${FROM_REF}-to${TO_REF}.log"
     echo >> "${OSM_CHANGES_FOLDER}/${repo}_changes-${BRANCH}-from${FROM_REF}-to${TO_REF}.log"
 
     # Print changes in the global changelog
     echo ${repo} >> "${OSM_CHANGES_FOLDER}/osm_changes-${BRANCH}-from${FROM_REF}-to${TO_REF}.log"
-    git -C ${OSM_CHANGES_FOLDER}/$repo log --pretty=format:"%C(yellow)%h %Cblue%ad %Cgreen%>(13,trunc)%an%Cred%d %Creset%s" --date=short ${FROM_REF}..${TO_REF} >> "${OSM_CHANGES_FOLDER}/osm_changes-${BRANCH}-from${FROM_REF}-to${TO_REF}.log"
+    git -C ${OSM_CHANGES_FOLDER}/$repo log --pretty=format:"%C(yellow)%h %Cblue%ad %Cgreen%>(13,trunc)%an %Creset%s" --date=short ${FROM_REF}..${TO_REF} >> "${OSM_CHANGES_FOLDER}/osm_changes-${BRANCH}-from${FROM_REF}-to${TO_REF}.log"
     echo >> "${OSM_CHANGES_FOLDER}/osm_changes-${BRANCH}-from${FROM_REF}-to${TO_REF}.log"
     echo "-----------------------------------------" >> "${OSM_CHANGES_FOLDER}/osm_changes-${BRANCH}-from${FROM_REF}-to${TO_REF}.log"
 done