build: download ACKNOWLEDGEMENTS.md for sentry-cli when packing#5231
build: download ACKNOWLEDGEMENTS.md for sentry-cli when packing#5231jamescrosswell wants to merge 1 commit into
Conversation
The Sentry NuGet package redistributes the sentry-cli executables, which compile third-party Rust crates whose OSS licenses require attribution. Add a download step for the platform-independent ACKNOWLEDGEMENTS.md alongside the existing platform-specific binary downloads so it is automatically included in the tools\ folder of the published package. ContinueOnError="WarnAndContinue" is used as a temporary fallback while getsentry/sentry-cli#2823 (adding the file to releases) is in progress. Once that ships the error handling can be tightened and hash verification added via update-cli.ps1. Closes #4588 #skip-changelog Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5231 +/- ##
=======================================
Coverage 74.12% 74.12%
=======================================
Files 508 508
Lines 18282 18282
Branches 3574 3574
=======================================
Hits 13551 13551
Misses 3861 3861
Partials 870 870 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@Flash0ver is this what you had in mind? |
Flash0ver
left a comment
There was a problem hiding this comment.
Not sure if we should do this before getsentry/sentry-cli#2823 is completed and shipped.
| SourceUrl="https://downloads.sentry-cdn.com/sentry-cli/$(SentryCLIVersion)/ACKNOWLEDGEMENTS.md" | ||
| DestinationFolder="$(SentryCLIDirectory)" | ||
| Condition="!Exists('$(SentryCLIDirectory)ACKNOWLEDGEMENTS.md')" | ||
| ContinueOnError="WarnAndContinue" |
There was a problem hiding this comment.
question: should we do this now?
Since getsentry/sentry-cli#2823 is not complete yet, this will always fail.
Should we wait until getsentry/sentry-cli#2823 is completed?
There was a problem hiding this comment.
Yeah I've marked the issue this closes as blocked by 2823.
| ContinueOnError is temporary while getsentry/sentry-cli#2823 is in progress — | ||
| remove it once sentry-cli starts publishing this file in releases. | ||
| --> | ||
| <DownloadFile |
There was a problem hiding this comment.
question: multi-targeting
Is this task executed multiple times, do to multiple TargetFrameworks?
If so - can we easily ensure to only run once?
| Retries="3" /> | ||
|
|
||
| <!-- Set executable permissions for local usage. --> | ||
| <Exec Command="chmod +x $(SentryCLIDirectory)*" Condition="!$([MSBuild]::IsOSPlatform('Windows'))" /> | ||
| </Target> |
There was a problem hiding this comment.
question: make .md file executable
Already existing code ... but would we make the .md file with the existing/following Exec task "execute" too? Could this be an issue?
Summary
The
SentryNuGet package bundlessentry-cliexecutables undertools/. Those binaries statically compile dozens of third-party Rust crates whose OSS licenses (Apache 2.0, MIT, etc.) require attribution when the software is redistributed. This PR adds the infrastructure to download and pack theACKNOWLEDGEMENTS.mdthat sentry-cli will publish alongside its binaries.What changed
DownloadSentryCLI, added aDownloadFilestep for the platform-independentACKNOWLEDGEMENTS.mdfromhttps://downloads.sentry-cdn.com/sentry-cli/<version>/ACKNOWLEDGEMENTS.md.<None Include="$(SentryCLIDirectory)**" Pack="true" PackagePath="tools\">wildcard already covers this file, so no extra pack entry is needed.ContinueOnError="WarnAndContinue"is used while getsentry/sentry-cli#2823 is still in progress (the file is not yet published in sentry-cli releases). Once that ships:ContinueOnError.update-cli.ps1to update it.Testing
MSB3923: Failed to download) for the missing file — not an error — confirming graceful degradation.update-cli.ps1 set-version <new>+ publish build will pull the file and pack it automatically.Closes #4588
#skip-changelog