Skip to content

Commit b9fe1a1

Browse files
committed
Merge branch 'master' of github.com:fsprojects/Paket
# Conflicts: # RELEASE_NOTES.md # global.json
2 parents dfd2d91 + cee1b0b commit b9fe1a1

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

RELEASE_NOTES.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#### 7.0.0-alpha001 - 2021-11-08
22
* Support as .NET 6.0 tool
33

4+
#### 6.2.1 - 2021-10-13
5+
* Roll forward for .NET tool - https://github.com/fsprojects/Paket/pull/4089
6+
7+
#### 6.1.3 - 2021-09-17
8+
* Added paket version to user-agent for nuget calls - https://github.com/fsprojects/Paket/pull/4087
9+
410
#### 6.1.2 - 2021-09-16
5-
* Unify the setting of version + package metadata in the 461 and .net core builds of Paket - https://github.com/fsprojects/Paket/pull/4083
11+
* Unified the setting of version + package metadata in the 461 and .net core builds of Paket - https://github.com/fsprojects/Paket/pull/4083
612

713
#### 6.1.0 - 2021-09-13
814
* Use a different nuget extraction routine to extract to versioned folders - https://github.com/fsprojects/Paket/pull/4081

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"sdk": {
33
"version": "6.0.100"
44
}
5-
}
5+
}

paket.dependencies

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
source https://nuget.org/api/v2
21
source https://api.nuget.org/v3/index.json
32

43
storage: none
@@ -40,7 +39,6 @@ github forki/FsUnit FsUnit.fs
4039
group Build
4140
content: none
4241
framework >= net461
43-
source https://nuget.org/api/v2
4442
source https://api.nuget.org/v3/index.json
4543
source https://ci.appveyor.com/nuget/fsharp-formatting
4644

@@ -59,6 +57,5 @@ group Build
5957
github enricosada/add_icon_to_exe:e11eda501acea369ac2950beb34b8888495bf21f rh/ResourceHacker.exe
6058

6159
group FSharpDepManagerExtension
62-
source https://nuget.org/api/v2
6360
source https://api.nuget.org/v3/index.json
6461
nuget FSharp.Core = 5.0.0 redirects: force

paket.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
STORAGE: NONE
22
CONTENT: NONE
33
NUGET
4-
remote: https://www.nuget.org/api/v2
4+
remote: https://api.nuget.org/v3/index.json
55
Argu (6.1.1)
66
FSharp.Core (>= 4.3.2) - restriction: >= netstandard2.0
77
System.Configuration.ConfigurationManager (>= 4.4) - restriction: >= netstandard2.0
@@ -951,7 +951,7 @@ GROUP Build
951951
CONTENT: NONE
952952
RESTRICTION: >= net461
953953
NUGET
954-
remote: https://www.nuget.org/api/v2
954+
remote: https://api.nuget.org/v3/index.json
955955
0x53A.ReferenceAssemblies.Paket (0.2)
956956
FAKE (4.64.17)
957957
FSharp.Compiler.Service (17.0.1)
@@ -982,5 +982,5 @@ GITHUB
982982
rh/ResourceHacker.exe (e11eda501acea369ac2950beb34b8888495bf21f)
983983
GROUP FSharpDepManagerExtension
984984
NUGET
985-
remote: https://www.nuget.org/api/v2
985+
remote: https://api.nuget.org/v3/index.json
986986
FSharp.Core (5.0) - redirects: force

src/Paket.Core/Common/NetUtils.fs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ let createHttpHandlerRaw(url, auth: Auth option) : HttpMessageHandler =
399399
handler.UseProxy <- true
400400
handler :> _
401401

402-
403402
let createHttpHandler =
404403
memoizeBy
405404
// Truncates the url to only to host part, so there is only one handler per source/host.
@@ -408,7 +407,13 @@ let createHttpHandler =
408407
(fun (url : string, auth) -> url.Substring(0, url.IndexOf('/', 8) + 1), auth)
409408
createHttpHandlerRaw
410409

411-
let createHttpClient (url,auth:Auth option) : HttpClient =
410+
let private paketVersion =
411+
let attrs = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(false)
412+
413+
attrs
414+
|> Seq.pick (fun a -> match a with | :? System.Reflection.AssemblyInformationalVersionAttribute as i -> Some i.InformationalVersion | _ -> None)
415+
416+
let createHttpClient (url, auth:Auth option) : HttpClient =
412417
let handler = createHttpHandler (url, auth)
413418
let client = new HttpClient(handler)
414419
match auth with
@@ -432,7 +437,7 @@ let createHttpClient (url,auth:Auth option) : HttpClient =
432437
| Some(Token token) ->
433438
client.DefaultRequestHeaders.Authorization <-
434439
new System.Net.Http.Headers.AuthenticationHeaderValue("token", token)
435-
client.DefaultRequestHeaders.Add("user-agent", "Paket")
440+
client.DefaultRequestHeaders.Add("user-agent", sprintf "Paket (%s)" paketVersion)
436441
client
437442

438443
#if USE_WEB_CLIENT_FOR_UPLOAD

0 commit comments

Comments
 (0)