Skip to content

feat: add cake-sdk manager for Cake.Sdk build scripts#41270

Closed
devlead wants to merge 1 commit intorenovatebot:mainfrom
devlead:feature/cakesdk
Closed

feat: add cake-sdk manager for Cake.Sdk build scripts#41270
devlead wants to merge 1 commit intorenovatebot:mainfrom
devlead:feature/cakesdk

Conversation

@devlead
Copy link

@devlead devlead commented Feb 17, 2026

Changes

Adds a new cake-sdk manager so Renovate can update dependencies in Cake.Sdk build scripts (file-based .cs scripts), in addition to the existing cake manager for Cake.Tool (.cake files).

  • File matching: By default matches cake.cs and build.cs only. Opt-in to all .cs files is documented via managerFilePatterns.
  • Extraction: Parses #:sdk Cake.Sdk@version, #:package PackageName@version, and InstallTool / InstallTools with nuget: / dotnet: URLs (same format as Cake.Tool tool directives).
  • Implementation: New module under lib/modules/manager/cake-sdk/ with extractPackageFile, fixtures, and unit tests; registered in lib/modules/manager/api.ts.
  • Docs: lib/modules/manager/cake-sdk/readme.md describes supported syntax and the opt-in for all .cs files.

Context

Please select one of the following:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Used Cursor for the cake-sdk manager implementation, tests, fixtures, and readme. Approach and structure were discussed; final edits, integration tests and PR text by me.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

(Manager readme in lib/modules/manager/cake-sdk/readme.md.)

How I've verified my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:

Real repo tests

Dry run

Dry run with node dist/renovate.js devlead/blobify --dry-run=full confirmed cake-sdk matched cake.cs and extracted Cake.Sdk, GitVersion.Tool, and DPI.

Given / When

node dist/renovate.js devlead/blobify --dry-run=full --git-author 'Mattias Karlsson <1647294+devlead@users.noreply.github.com>'

Then

 INFO: Repository started (repository=devlead/blobify)
       "renovateVersion": "0.0.0-semantic-release"
 INFO: Dependency extraction complete (repository=devlead/blobify, baseBranch=develop)
       "stats": {
         "managers": {
           "cake-sdk": {"fileCount": 1, "depCount": 3},
           "github-actions": {"fileCount": 1, "depCount": 5},
           "nuget": {"fileCount": 4, "depCount": 33}
         },
         "total": {"fileCount": 6, "depCount": 41}
       }
 INFO: DRY-RUN: Would commit files to branch renovate/gitversion.tool-6.x (repository=devlead/blobify, branch=renovate/gitversion.tool-6.x)
 INFO: DRY-RUN: Would commit files to branch renovate/dpi-2026.x (repository=devlead/blobify, branch=renovate/dpi-2026.x)
 INFO: DRY-RUN: Would ensure closed PR comment in PR #229 (repository=devlead/blobify, branch=renovate/microsoft.extensions.http-10.x)
 INFO: DRY-RUN: Would close Dependency Dashboard (repository=devlead/blobify)
       "title": "Dependency Dashboard"
 INFO: DRY-RUN: Would save repository cache. (repository=devlead/blobify)
 INFO: Repository finished (repository=devlead/blobify)
       "cloned": true,
       "durationMs": 8729,
       "result": "done",
       "status": "activated",
       "enabled": true,
       "onboarded": true
 INFO: Renovate was run at log level "info". Set LOG_LEVEL=debug in environment variables to see extended debug logs.

Production Run

Given

node dist/renovate.js devlead/blobify --git-author 'Mattias Karlsson <1647294+devlead@users.noreply.github.com>'
node dist/renovate.js devlead/ARI --git-author 'Mattias Karlsson <1647294+devlead@users.noreply.github.com>'
node dist/renovate.js devlead/bri --git-author 'Mattias Karlsson <1647294+devlead@users.noreply.github.com>'
node dist/renovate.js cake-build/cakesdk-example --git-author 'Mattias Karlsson <1647294+devlead@users.noreply.github.com>'
node dist/renovate.js azurevoodoo/renovate-cake-sdk-test --git-author 'Mattias Karlsson <1647294+devlead@users.noreply.github.com>'

Then

PRs Created

@github-actions github-actions bot requested a review from viceice February 17, 2026 21:14
@cla-assistant
Copy link

cla-assistant bot commented Feb 17, 2026

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link

cla-assistant bot commented Feb 17, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@devlead
Copy link
Author

devlead commented Feb 17, 2026

See now this might duplicate efforts in #40070

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this added to the existing cake manager? 🤔

@viceice
Copy link
Member

viceice commented Feb 18, 2026

feel free to take over #40070

@jamietanna jamietanna changed the title feat(manager): add cake-sdk manager for Cake.Sdk build scripts feat: add cake-sdk manager for Cake.Sdk build scripts Feb 18, 2026
@devlead
Copy link
Author

devlead commented Feb 18, 2026

shouldn't this added to the existing cake manager? 🤔

Cake.Sdk uses a different runtime, file extension, and not the same preprocessor directives, so it felt cleaner not to merge with the existing Cake.Tool (cake manager) implementation.

Addressed feedback, tested dry run, and against a real repo

@papauorg
Copy link
Contributor

papauorg commented Feb 19, 2026

Hi @devlead,

I just saw this PR and wanted to point to the PRs #40070 (which I think you already saw), and #40040.

Both PRs together would cover the functionality of this PR if I saw that correctly. I just wanted to explain my reasoning for those PRs.

#40040 extends the nuget manager because in my opinion the #:sdk and #:package directives in single file sources in C# are not specific to cake but can be used in any single file C# project and thus should be handled by the nuget manager.

#40070 extends the existing cake manager to also include the InstallTools method which is indeed specific to cake.

@devlead
Copy link
Author

devlead commented Feb 19, 2026

Hi @devlead,

I just saw this PR and wanted to point to the PRs #40070 (which I think you already saw), and #40040.

I missed checking existing PRs; that's on me, so I've got no issue with this being closed in favor of those PRs, or if anything in this can be merged into those, feel free to copy, no attribution needed. Or if maintainers want me to adjust anything, I'll do so.

- Add cake-sdk manager for cake.cs/build.cs (Cake.Sdk file-based scripts)
- Extract #:sdk, #:package, and InstallTool(s) with nuget/dotnet URL format
- Match (cake|build).cs by default; document opt-in for all .cs via managerFilePatterns
- Register in api.ts; add fixtures, tests, and readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants