Skip to content

Commit 476111a

Browse files
authored
C#: pass --skip-duplicate to dotnet nuget push (#7544)
NuGet versions are immutable, so the daily scheduled publish failed whenever no new commit had landed since the previous run (the snapshot version is derived from the latest commit timestamp). `--skip-duplicate` turns the duplicate response into a logged warning instead of an error.
1 parent 72154fd commit 476111a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

rewrite-csharp/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ val csharpPublish by tasks.registering(Exec::class) {
313313
findDotnet(), "nuget", "push",
314314
"dist/*.nupkg",
315315
"--source", "https://api.nuget.org/v3/index.json",
316-
"--api-key", project.findProperty("nugetApiKey")?.toString() ?: ""
316+
"--api-key", project.findProperty("nugetApiKey")?.toString() ?: "",
317+
"--skip-duplicate"
317318
)
318319
logger.lifecycle("Publishing C# NuGet package (version: $nugetVersion)")
319320
}

0 commit comments

Comments
 (0)