Skip to content

Commit ad6594a

Browse files
committed
Fix PushToMyGet task in build.cake.
1 parent b5a2cea commit ad6594a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

build.cake

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,18 @@ Task("PushToMyget")
315315

316316
var packageFiles = new List<FilePath>();
317317

318-
var nuspecFiles = GetFiles("./artifacts/packages/*.nuspec");
319-
foreach (var nuspecFile in nuspecFiles)
318+
var projects = new[]
319+
{
320+
"MongoDB.Bson",
321+
"MongoDB.Driver.Core",
322+
"MongoDB.Driver",
323+
"MongoDB.Driver.GridFS",
324+
"mongocsharpdriver" // the Nuget package name for MongoDB.Driver.Legacy
325+
};
326+
327+
foreach (var project in projects)
320328
{
321-
var packageFileName = nuspecFile.GetFilenameWithoutExtension() + ".nupkg";
329+
var packageFileName = $"{project}.{gitVersion.SemVer}.nupkg";
322330
var packageFile = artifactsPackagesDirectory.CombineWithFilePath(packageFileName);
323331
packageFiles.Add(packageFile);
324332
}

0 commit comments

Comments
 (0)