-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Update Rakefile #39846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Rakefile #39846
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures the language_scores_data
task runs as part of both the :generate
and :preview
workflows.
- Adds
rake language_scores_data
and failure handling to the:generate
task. - Inserts
rake language_scores_data
into the:preview
/:listen
task.
Rakefile
Outdated
success = system "rake language_scores_data" | ||
abort("Generating language scores failed") unless success |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider invoking the language_scores_data
task in-process (e.g., Rake::Task['language_scores_data'].invoke
) instead of shelling out to rake
, to improve performance and avoid spawning a new Ruby process.
success = system "rake language_scores_data" | |
abort("Generating language scores failed") unless success | |
begin | |
Rake::Task['language_scores_data'].invoke | |
rescue => e | |
abort("Generating language scores failed: #{e.message}") | |
end |
Copilot uses AI. Check for mistakes.
@@ -67,6 +69,7 @@ task :preview, :listen do |t, args| | |||
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css") | |||
system "rake analytics_data" | |||
system "rake version_data" | |||
system "rake language_scores_data" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The preview task doesn’t check the return value of language_scores_data
, so failures will be silent. You may want to mirror the :generate
task’s failure handling (e.g., abort on failure) to notify on errors.
system "rake language_scores_data" | |
success = system "rake language_scores_data" | |
abort("Generating language scores failed") unless success |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
📝 WalkthroughWalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Rakefile
participant RemoteServer as ohf-voice.github.io
participant LocalFS as Local File System
User->>Rakefile: Invoke generate/preview/compile task
Rakefile->>RemoteServer: Request language_scores.json
RemoteServer-->>Rakefile: Respond with JSON data
Rakefile->>LocalFS: Write data to _data/language_scores.json
Rakefile->>Rakefile: Continue with analytics, alerts, and version data tasks
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Proposed change
Fixes language scores task not firing
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit