diff --git a/build.fsx b/build.fsx index e0fe6cb83fc..a71d4d6e961 100644 --- a/build.fsx +++ b/build.fsx @@ -962,6 +962,7 @@ Target.create "DotNetCreateDebianPackage" (fun _ -> Target.create "DotNetPushChocolateyPackage" (fun _ -> let name = sprintf "%s.%s.nupkg" "fake" chocoVersion let path = sprintf "%s/%s" chocoReleaseDir name + let ignore_conflict = Environment.environVar "IGNORE_CONFLICT" = "true" if not Environment.isWindows && not (File.exists path) && fromArtifacts then Directory.ensure chocoReleaseDir @@ -975,12 +976,15 @@ Target.create "DotNetPushChocolateyPackage" (fun _ -> else { p with ToolPath = altToolPath } - path - |> Choco.push (fun p -> - { p with - Source = chocoSource - ApiKey = chocoKey.Value } - |> changeToolPath)) + try + path + |> Choco.push (fun p -> + { p with + Source = chocoSource + ApiKey = chocoKey.Value } + |> changeToolPath) + with exn when ignore_conflict -> + Trace.traceFAKE "ignore conflict error because IGNORE_CONFLICT=true!") Target.create "DotNetPushToNuGet" (fun _ -> !!(appDir "*/*.fsproj") -- (appDir "Fake.netcore/*.fsproj")