Skip to content

Commit

Permalink
Add SponsorLink
Browse files Browse the repository at this point in the history
This introduces SponsorLink to the project, so we can properly attribute sponsorships from uesrs.

See https://github.com/devlooped/SponsorLink/
  • Loading branch information
kzu committed Jan 24, 2023
1 parent 02250f4 commit b57ebee
Show file tree
Hide file tree
Showing 14 changed files with 94 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Directory.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

<!-- See https://github.com/scriban/scriban#source-embedding -->
<PackageScribanIncludeSource>true</PackageScribanIncludeSource>

<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>

<PropertyGroup Label="Build">
Expand Down
14 changes: 14 additions & 0 deletions src/ThisAssembly.AssemblyInfo/SponsorLink.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Devlooped;
using Microsoft.CodeAnalysis;

namespace ThisAssembly;

[Generator]
class Generator : IIncrementalGenerator
{
readonly SponsorLink link;

public Generator() => link = new SponsorLink("devlooped", "ThisAssembly.AssemblyInfo");

public void Initialize(IncrementalGeneratorInitializationContext context) => link.Initialize(context);
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on the `ThisAssembly.Info` class.
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.3.0" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

Expand Down
14 changes: 14 additions & 0 deletions src/ThisAssembly.Constants/SponsorLink.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Devlooped;
using Microsoft.CodeAnalysis;

namespace ThisAssembly;

[Generator]
class Generator : IIncrementalGenerator
{
readonly SponsorLink link;

public Generator() => link = new SponsorLink("devlooped", "ThisAssembly.Constants");

public void Initialize(IncrementalGeneratorInitializationContext context) => link.Initialize(context);
}
1 change: 1 addition & 0 deletions src/ThisAssembly.Constants/ThisAssembly.Constants.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ C#:
</ItemGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.3.0" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

Expand Down
14 changes: 14 additions & 0 deletions src/ThisAssembly.Metadata/SponsorLink.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Devlooped;
using Microsoft.CodeAnalysis;

namespace ThisAssembly;

[Generator]
class Generator : IIncrementalGenerator
{
readonly SponsorLink link;

public Generator() => link = new SponsorLink("devlooped", "ThisAssembly.Metadata");

public void Initialize(IncrementalGeneratorInitializationContext context) => link.Initialize(context);
}
1 change: 1 addition & 0 deletions src/ThisAssembly.Metadata/ThisAssembly.Metadata.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ C#:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.3.0" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

Expand Down
14 changes: 14 additions & 0 deletions src/ThisAssembly.Project/SponsorLink.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Devlooped;
using Microsoft.CodeAnalysis;

namespace ThisAssembly;

[Generator]
class Generator : IIncrementalGenerator
{
readonly SponsorLink link;

public Generator() => link = new SponsorLink("devlooped", "ThisAssembly.Project");

public void Initialize(IncrementalGeneratorInitializationContext context) => link.Initialize(context);
}
1 change: 1 addition & 0 deletions src/ThisAssembly.Project/ThisAssembly.Project.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ C#:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.3.0" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

Expand Down
14 changes: 14 additions & 0 deletions src/ThisAssembly.Resources/SponsorLink.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Devlooped;
using Microsoft.CodeAnalysis;

namespace ThisAssembly;

[Generator]
class Generator : IIncrementalGenerator
{
readonly SponsorLink link;

public Generator() => link = new SponsorLink("devlooped", "ThisAssembly.Resources");

public void Initialize(IncrementalGeneratorInitializationContext context) => link.Initialize(context);
}
1 change: 1 addition & 0 deletions src/ThisAssembly.Resources/ThisAssembly.Resources.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.3.0" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

Expand Down
14 changes: 14 additions & 0 deletions src/ThisAssembly.Strings/SponsorLink.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Devlooped;
using Microsoft.CodeAnalysis;

namespace ThisAssembly;

[Generator]
class Generator : IIncrementalGenerator
{
readonly SponsorLink link;

public Generator() => link = new SponsorLink("devlooped", "ThisAssembly.Strings");

public void Initialize(IncrementalGeneratorInitializationContext context) => link.Initialize(context);
}
1 change: 1 addition & 0 deletions src/ThisAssembly.Strings/ThisAssembly.Strings.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ such as "Hello {name}".
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Devlooped.SponsorLink" Version="0.3.0" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />

Expand Down
3 changes: 2 additions & 1 deletion src/ThisAssembly.Tests/ThisAssembly.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@

<ItemGroup>
<PackageReference Include="PolySharp" Version="1.8.3" PrivateAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" Pack="false" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" Pack="false" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit b57ebee

Please sign in to comment.