Skip to content

Commit

Permalink
(GH-519) Allow multiple sources
Browse files Browse the repository at this point in the history
This will allow creation of multiple NuGet/Chocolatey sources that use
Username and Password, rather than an API Key.
  • Loading branch information
gep13 committed Jul 4, 2020
1 parent c38ece3 commit 68f8d6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cake.Recipe/Content/packages.cake
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public void PushChocolateyPackages(ICakeContext context, bool isRelease, List<Pa
};

context.Information("Adding Chocolatey source with user/pass...");
context.ChocolateyAddSource(isRelease ? "ReleaseSource" : "PreReleaseSource", chocolateySource.PushUrl, chocolateySourceSettings);
context.ChocolateyAddSource(isRelease ? string.Format("ReleaseSource_{0}", chocolateySource.Name) : string.Format("PreReleaseSource_{0}", chocolateySource.Name), chocolateySource.PushUrl, chocolateySourceSettings);
canPushToChocolateySource = true;
}
else
Expand Down Expand Up @@ -280,7 +280,7 @@ public void PushNuGetPackages(ICakeContext context, bool isRelease, List<Package
};

context.Information("Adding NuGet source with user/pass...");
context.NuGetAddSource(isRelease ? "ReleaseSource" : "PreReleaseSource", nugetSource.PushUrl, nugetSourceSettings);
context.NuGetAddSource(isRelease ? string.Format("ReleaseSource_{0}", nugetSource.Name) : string.Format("PreReleaseSource_{0}", nugetSource.Name), nugetSource.PushUrl, nugetSourceSettings);
canPushToNuGetSource = true;
}
else
Expand Down

0 comments on commit 68f8d6f

Please sign in to comment.