Skip to content

Commit f884c89

Browse files
committed
fix: improve release script reliability and messaging
Based on issues encountered during v0.1.35 release: 1. Matrix announcement improvements: - Remove emoji formatting that caused matrix-commander to hang - Use room ID instead of alias for reliability - Add 30-second timeout to prevent hanging 2. Better auto-merge handling: - Add clear messaging that manual merge is an option - Improve progress updates with elapsed time and check counts - Show "All checks passed, waiting for auto-merge" when ready 3. Script continuation after manual PR merge: - Script already detects manual merges correctly - Added messaging to inform users they can manually merge These changes address: - Matrix emoji formatting causing 12+ minute hangs - Unclear messaging during auto-merge delays - Users not knowing they can manually merge without breaking the flow [AI-assisted debugging and comment]
1 parent 40dbdb3 commit f884c89

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

scripts/release.sh

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,12 @@ Generated by: \`scripts/release.sh\`" \
449449
echo -n " Enabling auto-merge... "
450450
gh pr merge "$pr_number" --squash --auto >/dev/null 2>&1
451451
echo ""
452-
452+
453453
echo " ⏳ Waiting for GitHub CI and auto-merge..."
454454
echo " You can monitor at: https://github.com/freenet/freenet-core/pull/$pr_number"
455-
455+
echo " 💡 Note: You can manually merge the PR if needed - the script will detect it and continue"
456+
echo
457+
456458
# Monitor CI with enhanced failure reporting
457459
local wait_time=30
458460
local total_wait=0
@@ -515,15 +517,16 @@ Generated by: \`scripts/release.sh\`" \
515517
else
516518
# Show status for pending/in-progress checks
517519
pending_checks=$(echo "$checks_output" | grep -E "pending|in_progress" | wc -l)
520+
passed_checks=$(echo "$checks_output" | grep -E "pass" | wc -l)
518521
if [[ $pending_checks -gt 0 ]]; then
519-
echo " ⏳ Waiting... ($pending_checks checks in progress)"
522+
echo " ⏳ Waiting... ($passed_checks checks passed, $pending_checks in progress, ${total_wait}s elapsed)"
520523
else
521-
echo "Waiting for auto-merge..."
524+
echo "All checks passed, waiting for auto-merge... (${total_wait}s elapsed)"
522525
fi
523526
fi
524527
;;
525528
esac
526-
529+
527530
sleep $wait_time
528531
total_wait=$((total_wait + wait_time))
529532
done
@@ -782,15 +785,15 @@ announce_to_matrix() {
782785
local feature_count=$(echo "$release_notes" | grep -c "^- \*\*#.*Features" || echo "0")
783786

784787
# Extract key highlights (first 3 fixes or features)
785-
local highlights=$(echo "$release_notes" | grep "^- \*\*#" | head -3 | sed 's/^- / /')
788+
local highlights=$(echo "$release_notes" | grep "^- \*\*#" | head -3 | sed 's/^- / - /')
786789

787-
local announcement="🎉 **Freenet v$VERSION Released!**
790+
local announcement="Freenet v$VERSION Released!
788791
789-
📦 Published to crates.io:
790-
freenet v$VERSION
791-
fdev v$FDEV_VERSION
792+
Published to crates.io:
793+
- freenet v$VERSION
794+
- fdev v$FDEV_VERSION
792795
793-
🔗 Release: https://github.com/freenet/freenet-core/releases/tag/v$VERSION
796+
Release: https://github.com/freenet/freenet-core/releases/tag/v$VERSION
794797
795798
Key highlights:
796799
$highlights
@@ -800,7 +803,8 @@ Full changelog available at the release link above.
800803
[AI-assisted release announcement]"
801804

802805
echo -n " Sending announcement to Matrix... "
803-
if matrix-commander -r '#freenet-locutus:matrix.org' -m "$announcement" &>/dev/null; then
806+
# Use room ID instead of alias for reliability, add timeout
807+
if timeout 30 matrix-commander -r '!ygHfYcXtXmivTbOwjX:matrix.org' -m "$announcement" &>/dev/null; then
804808
echo ""
805809
else
806810
echo ""

0 commit comments

Comments
 (0)