@@ -231,7 +231,11 @@ step2_check_clean_tree() {
231231
232232 if ! git diff --quiet HEAD 2> /dev/null || ! git diff --cached --quiet 2> /dev/null; then
233233 echo " ERROR: Source tree has uncommitted changes. Please commit or stash first." >&2
234- exit " $EXIT_DIRTY_TREE "
234+ if [[ " $DRY_RUN " == true ]]; then
235+ log_dry " Would exit with ${EXIT_DIRTY_TREE} "
236+ else
237+ exit " $EXIT_DIRTY_TREE "
238+ fi
235239 fi
236240
237241 local untracked
@@ -590,31 +594,41 @@ step11_update_readme() {
590594step12_check_other_changes () {
591595 log_step " 12" " Check for other required changes"
592596
597+ local from_human
598+ from_human=" $( numeric_to_human " $FROM_VERSION " ) "
593599 local to_human
594600 to_human=" $( numeric_to_human " $NEW_VERSION " ) "
595601
596- log " Fetching SQLite changelog for ${to_human} ..."
602+ log " Fetching SQLite changelog from ${from_human} to ${to_human} ..."
597603
598604 local changes_html
599605 changes_html=" $( curl -sL " $SQLITE_CHANGES_URL " 2> /dev/null || true) "
600606
601607 if [[ -n " $changes_html " ]]; then
602- # Extract changelog entries for the target version
603- # SQLite changes.html has sections per version
608+ # Extract changelog entries for ALL versions between from and to.
609+ # SQLite changes.html lists versions in reverse chronological order
610+ # (newest first), with each version section starting at an <h3> heading
611+ # like: <h3>2025-04-15 (3.51.4)</h3>
612+ # We capture from the to_human heading down to (but not including)
613+ # the from_human heading, which gives us all intermediate versions.
604614 local changelog_section
605615 changelog_section=" $( echo " $changes_html " | \
606- sed -n " /<h[23]>/,/<h[23]>/p" | \
607- sed -n " /${to_human} /,/<h[23]>/p" | \
608- head -50 || true) "
616+ awk -v from=" $from_human " -v to=" $to_human " '
617+ /<h[23]>/ {
618+ if (index($0, from) > 0 && index($0, to) == 0) { capturing = 0; next }
619+ if (index($0, to) > 0) { capturing = 1 }
620+ }
621+ capturing { print }
622+ ' | head -100 || true) "
609623
610624 if [[ -n " $changelog_section " ]]; then
611625 echo " "
612- echo " === SQLite Changelog for ${to_human} ==="
626+ echo " === SQLite Changelog: ${from_human} → ${to_human} ==="
613627 # Strip HTML tags for display
614- echo " $changelog_section " | sed ' s/<[^>]*>//g' | sed ' /^$/d' | head -30
628+ echo " $changelog_section " | sed ' s/<[^>]*>//g' | sed ' /^$/d' | head -50
615629 echo " === End of changelog excerpt ==="
616630 else
617- log " Could not extract changelog for ${to_human} "
631+ log " Could not extract changelog for ${from_human} → ${ to_human}"
618632 fi
619633 else
620634 log " WARNING: Could not fetch SQLite changelog"
0 commit comments