diff --git a/Scripts/prepare_release.sh b/Scripts/prepare_release.sh index 66d2f593..aae61673 100755 --- a/Scripts/prepare_release.sh +++ b/Scripts/prepare_release.sh @@ -94,6 +94,13 @@ cp "$ARCHIVE_EXECUTABLE" CommandLineTool/swiftformat echo "Formatting using new binary..." bash format.sh +# 9. Build again after formatting to ensure no issues were introduced +echo "Building after formatting..." +if ! swift build -c release; then + echo "Error: Build failed after formatting. Please fix the issues before proceeding." + exit 1 +fi + echo "" echo "✅ Release preparation completed successfully for version $NEW_VERSION!" echo ""