Skip to content

Commit

Permalink
Enable SponsorLink for improved sustainability
Browse files Browse the repository at this point in the history
This will allow me to be more responsive with support and ongoing maintenance.
  • Loading branch information
kzu committed Feb 6, 2023
1 parent 553392d commit 18443e6
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
12 changes: 10 additions & 2 deletions GitInfo.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31613.86
# Visual Studio Version 17
VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A5ED9F27-FAE0-45B7-84F9-9D6C35C7E1AC}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.github\workflows\build.yml = .github\workflows\build.yml
src\Directory.props = src\Directory.props
.github\workflows\publish.yml = .github\workflows\publish.yml
EndProjectSection
EndProject
Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "GitInfo", "src\GitInfo\GitInfo.msbuildproj", "{1D5D9080-CF62-49E1-87AC-F2EDA58A824E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Analyzer", "src\Analyzer\Analyzer.csproj", "{B96EB399-A569-4C4B-A702-99D6050B1FAF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +25,10 @@ Global
{1D5D9080-CF62-49E1-87AC-F2EDA58A824E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D5D9080-CF62-49E1-87AC-F2EDA58A824E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D5D9080-CF62-49E1-87AC-F2EDA58A824E}.Release|Any CPU.Build.0 = Release|Any CPU
{B96EB399-A569-4C4B-A702-99D6050B1FAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B96EB399-A569-4C4B-A702-99D6050B1FAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B96EB399-A569-4C4B-A702-99D6050B1FAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B96EB399-A569-4C4B-A702-99D6050B1FAF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
15 changes: 15 additions & 0 deletions src/Analyzer/Analyzer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackFolder>analyzers/dotnet</PackFolder>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="ThisAssembly.AssemblyInfo" Version="1.2.4" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" Pack="false" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.9.0" />
</ItemGroup>

</Project>
20 changes: 20 additions & 0 deletions src/Analyzer/SponsorLinker.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using Devlooped;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis;

namespace GitInfo;

[Generator]
[DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic, LanguageNames.FSharp)]
class SponsorLinker : SponsorLink
{
public SponsorLinker() : base(SponsorLinkSettings.Create(
"devlooped", "GitInfo",
version: new Version(ThisAssembly.Info.Version).ToString(2)
#if DEBUG
, quietDays: 0
#endif
))
{ }
}
7 changes: 5 additions & 2 deletions src/GitInfo/GitInfo.msbuildproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
<PackageReadmeFile>readme.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NuGetizer" Version="0.7.4" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="NuGetizer" Version="0.9.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<None Include="build/**/*.*" />
<None Include="buildMultiTargeting/**/*.*" />
<None Include="buildTransitive/**/*.*" />
<None Include="..\..\readme.md" PackagePath="readme.md" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Analyzer\Analyzer.csproj" />
</ItemGroup>
</Project>

0 comments on commit 18443e6

Please sign in to comment.