From 4f41aa37b37c4d60b3fca933d205c2d255495aac Mon Sep 17 00:00:00 2001 From: Peter af Geijerstam Date: Mon, 13 Mar 2017 10:20:57 +0100 Subject: [PATCH] Added version-option to NugetUpdate --- src/app/FakeLib/NuGet/Update.fs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/FakeLib/NuGet/Update.fs b/src/app/FakeLib/NuGet/Update.fs index 5cff859fbbe..4cad4495421 100644 --- a/src/app/FakeLib/NuGet/Update.fs +++ b/src/app/FakeLib/NuGet/Update.fs @@ -18,6 +18,8 @@ type NugetUpdateParams = Sources: string list /// Packages to update. Update all if empty. Ids: string list + /// Version to update to. Default `None`. Used to upgrade/downgrade to a explicit version of a package. + Version: string option /// Folder to store packages in. Default `./packages`. RepositoryPath: string /// Looks for updates with the highest version available within the same major and minor version as the installed package. Default `false`. @@ -38,6 +40,7 @@ let NugetUpdateDefaults = Retries = 5 Sources = [] Ids = [] + Version = None RepositoryPath = "./packages" Safe = false Verbose = false @@ -50,6 +53,7 @@ let buildArgs (param: NugetUpdateParams) = [ param.Sources |> argList "source" param.Ids |> argList "id" [param.RepositoryPath] |> argList "repositoryPath" + param.Version |> Option.toList |> argList "Version" (if param.Safe then "-safe" else "") (if param.Prerelease then "-prerelease" else "") (if param.NonInteractive then "-nonInteractive" else "")