Skip to content

Commit

Permalink
Debug empty release notes 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmhouston committed Oct 7, 2024
1 parent d70f997 commit 9089709
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build+release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -410,25 +410,31 @@ jobs:
changeLogFilename=CHANGELOG.md
currentNotesFilename="${{ steps.version.outputs.releaseName }}.md"
if [[ ! -f $changeLogFilename ]] ; then
echo "::warning::Release notes file is missing"
echo "::warning::Change log file is missing"
numlines=0
else
echo "- Look for top change log section matching version ${{ steps.version.outputs.version }}"
echo -n "" > "${{ env.builddir }}/$currentNotesFilename"
thisversion=''
prevversion=''
while read line || [[ -n $line ]] ; do
if [[ -z $thisversion ]]; then
thisversion=$(echo $line | sed -n -E 's/^#+ version ([0-9.dabrc]+) .*$/\1/p')
if [[ -n $thisversion && $thisversion != "${{ steps.version.outputs.version }}" ]] ; then
echo "::warning::Version $thisversion at the top of the release notes doesn't match build version ${{ steps.version.outputs.version }}"
break
if [[ -n $thisversion ]] ; then
if [[ $thisversion != "${{ steps.version.outputs.version }}" ]] ; then
echo "::warning::Version $thisversion at the top of the change log doesn't match build version ${{ steps.version.outputs.version }}"
break
fi
echo "- Accumulate lines until next change log section for a different version"
fi
continue
fi
prevversion=$(echo $line | sed -n -E 's/^#+ version ([0-9.dabrc]+) .*$/\1/p')
if [[ -n $prevversion ]] ; then
echo "- Found next change log section, done reading the change log"
break
fi
echo "- Take a line from change log"
echo $line >> "${{ env.builddir }}/$currentNotesFilename"
done < "$changeLogFilename"
Expand Down

0 comments on commit 9089709

Please sign in to comment.