Skip to content

Commit

Permalink
Updated the error log file format
Browse files Browse the repository at this point in the history
Signed-off-by: Charan-Sharan <[email protected]>
  • Loading branch information
Charan-Sharan committed Jun 20, 2024
1 parent 505130d commit b0e3008
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test-hyperlinks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ jobs:
fi
fi
done
- name: report Error links
run: |
Number_of_404_links=$( cat error-report.log | wc -l )
Expand All @@ -170,16 +171,16 @@ jobs:
baseDir=${PWD/$(basename $PWD)}
baseDir=$(echo $baseDir | sed 's/\//\\\//g')
sed -i "s/${baseDir}//g" error-report.log
fileNames=$(cat Temp/BrokenLinks.txt | cut -d ':' -f1 | sort | uniq )
fileNames=$(cat error-report.log | cut -d ':' -f1 | sort | uniq )
fileCount=1
for line in $fileNames
do
rawLines=$( cat Temp/BrokenLinks.txt | grep $line | cut -d ':' -f2- )
echo "$fileCount. $line" >> Broken-links.log
rawLines=$( cat error-report.log | grep $line | cut -d ':' -f2- )
echo "$fileCount. $line" >> error-report.log
fileCount=$(( fileCount + 1))
for rawLine in $rawLines
do
echo -e "\t Line $rawLine" | sed 's/:/ : /' >> Broken-links.log
echo -e "\t Line $rawLine" | sed 's/:/ : /' >> error-report.log
done
done
Expand Down

0 comments on commit b0e3008

Please sign in to comment.