Skip to content

Commit 10283f9

Browse files
committed
LOL oh wait, never mind, who needs codegen
1 parent 1aa9d22 commit 10283f9

File tree

8 files changed

+12
-186
lines changed

8 files changed

+12
-186
lines changed

codeGen/idunno.VersionGenerator.Debug/Program.cs

Lines changed: 0 additions & 4 deletions
This file was deleted.

codeGen/idunno.VersionGenerator.Debug/idunno.VersionGenerator.Debug.csproj

Lines changed: 0 additions & 20 deletions
This file was deleted.

codeGen/idunno.VersionGenerator/Properties/launchSettings.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

codeGen/idunno.VersionGenerator/VersionGenerator.cs

Lines changed: 0 additions & 91 deletions
This file was deleted.

codeGen/idunno.VersionGenerator/idunno.VersionGenerator.csproj

Lines changed: 0 additions & 37 deletions
This file was deleted.

idunno.Bluesky.sln

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Step4", "docs\docs\bots\cod
233233
EndProject
234234
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Step5", "docs\docs\bots\code\WatcherBot\Step5\Step5.csproj", "{061FF07D-DC46-5649-2A78-94B86652F4E8}"
235235
EndProject
236-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "codeGen", "codeGen", "{20879E4B-C3E0-480E-9EA0-CD13C2F888C4}"
237-
EndProject
238-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "idunno.VersionGenerator", "codeGen\idunno.VersionGenerator\idunno.VersionGenerator.csproj", "{21925E4E-5085-C86E-0777-BF70500268FE}"
239-
EndProject
240-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "idunno.VersionGenerator.Debug", "codeGen\idunno.VersionGenerator.Debug\idunno.VersionGenerator.Debug.csproj", "{5DA63169-F9BB-49C6-A43A-AFD5992B1CB7}"
241-
EndProject
242236
Global
243237
GlobalSection(SolutionConfigurationPlatforms) = preSolution
244238
CodeQL|Any CPU = CodeQL|Any CPU
@@ -392,18 +386,6 @@ Global
392386
{061FF07D-DC46-5649-2A78-94B86652F4E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
393387
{061FF07D-DC46-5649-2A78-94B86652F4E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
394388
{061FF07D-DC46-5649-2A78-94B86652F4E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
395-
{21925E4E-5085-C86E-0777-BF70500268FE}.CodeQL|Any CPU.ActiveCfg = Debug|Any CPU
396-
{21925E4E-5085-C86E-0777-BF70500268FE}.CodeQL|Any CPU.Build.0 = Debug|Any CPU
397-
{21925E4E-5085-C86E-0777-BF70500268FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
398-
{21925E4E-5085-C86E-0777-BF70500268FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
399-
{21925E4E-5085-C86E-0777-BF70500268FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
400-
{21925E4E-5085-C86E-0777-BF70500268FE}.Release|Any CPU.Build.0 = Release|Any CPU
401-
{5DA63169-F9BB-49C6-A43A-AFD5992B1CB7}.CodeQL|Any CPU.ActiveCfg = Debug|Any CPU
402-
{5DA63169-F9BB-49C6-A43A-AFD5992B1CB7}.CodeQL|Any CPU.Build.0 = Debug|Any CPU
403-
{5DA63169-F9BB-49C6-A43A-AFD5992B1CB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
404-
{5DA63169-F9BB-49C6-A43A-AFD5992B1CB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
405-
{5DA63169-F9BB-49C6-A43A-AFD5992B1CB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
406-
{5DA63169-F9BB-49C6-A43A-AFD5992B1CB7}.Release|Any CPU.Build.0 = Release|Any CPU
407389
EndGlobalSection
408390
GlobalSection(SolutionProperties) = preSolution
409391
HideSolutionNode = FALSE
@@ -455,8 +437,6 @@ Global
455437
{3CD72755-37E5-D821-DE3A-378D01FDD4E9} = {8EF4CCE5-0328-4ED0-9D28-F5E9CC2F2EB4}
456438
{E2D3A4A9-5FD9-AE9B-0C33-E08069CA710C} = {8EF4CCE5-0328-4ED0-9D28-F5E9CC2F2EB4}
457439
{061FF07D-DC46-5649-2A78-94B86652F4E8} = {8EF4CCE5-0328-4ED0-9D28-F5E9CC2F2EB4}
458-
{21925E4E-5085-C86E-0777-BF70500268FE} = {20879E4B-C3E0-480E-9EA0-CD13C2F888C4}
459-
{5DA63169-F9BB-49C6-A43A-AFD5992B1CB7} = {20879E4B-C3E0-480E-9EA0-CD13C2F888C4}
460440
EndGlobalSection
461441
GlobalSection(ExtensibilityGlobals) = postSolution
462442
SolutionGuid = {B2B9F8C2-975D-4E3A-B05E-48FDF4BCE3E6}

src/idunno.AtProto/Agent.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Net;
55
using System.Net.Http.Headers;
66
using System.Net.Mime;
7-
7+
using System.Reflection;
88
using Microsoft.Extensions.DependencyInjection;
99

1010
namespace idunno.AtProto
@@ -188,9 +188,19 @@ private static void InternalConfigureHttpClient(HttpClient client, string? httpU
188188
client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrLower;
189189
client.DefaultRequestVersion = HttpVersion.Version20;
190190

191+
Assembly assembly = typeof(Agent).Assembly;
192+
string? version = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion;
193+
191194
if (httpUserAgent is null)
192195
{
193-
client.DefaultRequestHeaders.UserAgent.ParseAdd("idunno.AtProto/" + Versioning.JsonVersion);
196+
if (string.IsNullOrEmpty(version))
197+
{
198+
client.DefaultRequestHeaders.UserAgent.ParseAdd("idunno.AtProto");
199+
}
200+
else
201+
{
202+
client.DefaultRequestHeaders.UserAgent.ParseAdd("idunno.AtProto/" + version);
203+
}
194204
}
195205
else
196206
{

src/idunno.AtProto/idunno.AtProto.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@
6464
<PackageReference Include="ZstdSharp.Port" />
6565
</ItemGroup>
6666

67-
<ItemGroup>
68-
<ProjectReference Include="..\..\codeGen\idunno.VersionGenerator\idunno.VersionGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
69-
</ItemGroup>
70-
7167
<ItemGroup>
7268
<Compile Update="Resource.Designer.cs">
7369
<DesignTime>True</DesignTime>

0 commit comments

Comments
 (0)