diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index bd44c5c482..47eeb6ef69 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,7 @@ +#### 1.18.3 +* Support Odata query fallback for package details with /odata prefix +* Establish beta-level comatibility with Klondike nuget server + #### 1.18.2 - 23.06.2015 * BUGFIX: Use updated globbing for paket.template diff --git a/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs b/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs index 9765e25734..e709ae4f5d 100644 --- a/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs +++ b/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs @@ -4,11 +4,11 @@ [assembly: AssemblyTitleAttribute("Paket.Bootstrapper")] [assembly: AssemblyProductAttribute("Paket")] [assembly: AssemblyDescriptionAttribute("A package dependency manager for .NET with support for NuGet packages and GitHub repositories.")] -[assembly: AssemblyVersionAttribute("1.18.2")] -[assembly: AssemblyFileVersionAttribute("1.18.2")] -[assembly: AssemblyInformationalVersionAttribute("1.18.2")] +[assembly: AssemblyVersionAttribute("1.18.3")] +[assembly: AssemblyFileVersionAttribute("1.18.3")] +[assembly: AssemblyInformationalVersionAttribute("1.18.3")] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "1.18.2"; + internal const string Version = "1.18.3"; } } diff --git a/src/Paket.Core/AssemblyInfo.fs b/src/Paket.Core/AssemblyInfo.fs index 2ec6bcf782..66df2a3d20 100644 --- a/src/Paket.Core/AssemblyInfo.fs +++ b/src/Paket.Core/AssemblyInfo.fs @@ -5,10 +5,10 @@ open System.Reflection [] [] [] -[] -[] -[] +[] +[] +[] do () module internal AssemblyVersionInformation = - let [] Version = "1.18.2" + let [] Version = "1.18.3" diff --git a/src/Paket.Core/NuGetV2.fs b/src/Paket.Core/NuGetV2.fs index 7b9fade15d..1c3275c7b2 100644 --- a/src/Paket.Core/NuGetV2.fs +++ b/src/Paket.Core/NuGetV2.fs @@ -239,7 +239,15 @@ let getDetailsFromNuGetViaOData auth nugetURL package (version:SemVerInfo) = return! getDetailsFromNuGetViaODataFast auth nugetURL package version with _ -> let url = sprintf "%s/Packages(Id='%s',Version='%s')" nugetURL package (version.ToString()) - let! raw = getFromUrl(auth,url) + let! response = safeGetFromUrl(auth,url) + + let! raw = + match response with + | Some(r) -> async { return r } + | None -> + let url = sprintf "%s/odata/Packages(Id='%s',Version='%s')" nugetURL package (version.ToString()) + getXmlFromUrl(auth,url) + if verbose then tracefn "Response from %s:" url tracefn "" diff --git a/src/Paket.Core/Utils.fs b/src/Paket.Core/Utils.fs index 36ce4b5327..1fda1056ff 100644 --- a/src/Paket.Core/Utils.fs +++ b/src/Paket.Core/Utils.fs @@ -188,6 +188,24 @@ let getFromUrl (auth:Auth option, url : string) = return "" } +let getXmlFromUrl (auth:Auth option, url : string) = + async { + try + use client = createWebClient(url,auth) + + // mimic the headers sent from nuget client to odata/ endpoints + client.Headers.Add(HttpRequestHeader.Accept, "application/atom+xml, application/xml") + client.Headers.Add(HttpRequestHeader.AcceptCharset, "UTF-8") + client.Headers.Add("DataServiceVersion", "1.0;NetFx") + client.Headers.Add("MaxDataServiceVersion", "2.0;NetFx") + + return! client.AsyncDownloadString(Uri(url)) + with + | exn -> + failwithf "Could not retrieve data from %s%s Message: %s" url Environment.NewLine exn.Message + return "" + } + /// [omit] let safeGetFromUrl (auth:Auth option, url : string) = async { diff --git a/src/Paket.PowerShell/AssemblyInfo.fs b/src/Paket.PowerShell/AssemblyInfo.fs index e62d636990..595ba1f99a 100644 --- a/src/Paket.PowerShell/AssemblyInfo.fs +++ b/src/Paket.PowerShell/AssemblyInfo.fs @@ -5,10 +5,10 @@ open System.Reflection [] [] [] -[] -[] -[] +[] +[] +[] do () module internal AssemblyVersionInformation = - let [] Version = "1.18.2" + let [] Version = "1.18.3" diff --git a/src/Paket/AssemblyInfo.fs b/src/Paket/AssemblyInfo.fs index 00dc0602b1..861100275d 100644 --- a/src/Paket/AssemblyInfo.fs +++ b/src/Paket/AssemblyInfo.fs @@ -5,10 +5,10 @@ open System.Reflection [] [] [] -[] -[] -[] +[] +[] +[] do () module internal AssemblyVersionInformation = - let [] Version = "1.18.2" + let [] Version = "1.18.3"