[build] Add DocFX updater script#16980
Conversation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Latest suggestions up to 406d8a8
Previous suggestions✅ Suggestions up to commit 894dde4
|
|||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
This PR adds automated DocFX version updating for .NET documentation builds. The script fetches the latest DocFX release from NuGet (not GitHub as stated in the description), computes its SHA256 hash, and updates the Bazel repository rule configuration file.
Changes:
- Add
scripts/update_docfx.pyto automatically fetch and update DocFX versions from NuGet - Add py_binary target in
scripts/BUILD.bazelfor the new script - Integrate the updater into
dotnet/update-deps.shworkflow - Update DocFX from version 2.78.2 to 2.78.4 with corresponding SHA256
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| scripts/update_docfx.py | New Python script that fetches DocFX version info from NuGet API and generates updated Bazel configuration |
| scripts/BUILD.bazel | Adds py_binary target for update_docfx with packaging dependency |
| dotnet/update-deps.sh | Integrates DocFX updater into the .NET dependency update workflow |
| dotnet/private/docfx_repo.bzl | Updates DocFX version from 2.78.2 to 2.78.4 with new SHA256 hash |
- Validate explicit version exists in NuGet index before use - Remove fallback that ignored --allow-prerelease flag Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Validate explicit version exists in NuGet index before use - Remove fallback that ignored --allow-prerelease flag - Switch from urllib.request to urllib3 for consistency with other scripts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Persistent suggestions updated to latest commit 406d8a8 |
* Add DocFX updater script * Validate explicit version exists in NuGet index before use * Switch from urllib.request to urllib3 for consistency with other scripts
User description
Making sure dependencies we're pinning generally have a way to auto-update.
💥 What does this PR do?
Adds automated DocFX version updating for .NET documentation builds:
scripts/update_docfx.pyto automatically fetch the latest DocFX release from GitHubdotnet/update-deps.sh🔧 Implementation Notes
The script fetches release information from the GitHub API and updates
dotnet/private/docfx_repo.bzlwith the latest version and SHA256 hash.
🔄 Types of changes
PR Type
Enhancement
Description
Add automated DocFX version updater script for NuGet packages
Fetch latest DocFX release and compute SHA256 hash automatically
Integrate updater into dotnet/update-deps.sh build workflow
Bump DocFX from 2.78.2 to 2.78.4
Diagram Walkthrough
File Walkthrough
update_docfx.py
DocFX version updater script implementationscripts/update_docfx.py
docfx_repo.bzlwith version and hashdocfx_repo.bzl
Update DocFX to version 2.78.4dotnet/private/docfx_repo.bzl
update-deps.sh
Integrate DocFX updater into build workflowdotnet/update-deps.sh
bazel run //scripts:update_docfxat end of scriptBUILD.bazel
Add build target for DocFX updaterscripts/BUILD.bazel
py_binarytarget forupdate_docfxscriptpackaginglibrary for version parsing