Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ targets:
### NuGet (`nuget`)

Uploads packages to [NuGet](https://www.nuget.org/) via [.NET Core](https://github.com/dotnet/core).
By default, `craft` publishes all packages with `.nupkg` extension.
Normally, `craft` targets raise an exception when trying to release a version that already exists. *This target diverges from the norm and allows re-entrant publishing* as it can publish multiple packages at once and the processes might get interrupted. This behavior allows us to finalize half-finished releases without having to publish a new version and play cat & mouse with the flaky upstream package repository.

**Environment**

Expand Down
5 changes: 5 additions & 0 deletions src/targets/nuget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ export class NugetTarget extends BaseTarget {
'--api-key',
'${NUGET_API_TOKEN}',
'--source',
// Warning: `--skip-duplicate` means we will NOT error when a version
// already exists. This is unlike any other target in Craft but
// became needed here as NuGet repo is quite flaky and we need to
// publish many packages at once without another way to resume a
// broken release.
'--skip-duplicate',
this.nugetConfig.serverUrl,
];
Expand Down
Loading