Skip to content

Commit

Permalink
⬆️ Bump files with dotnet-file sync
Browse files Browse the repository at this point in the history
# devlooped/oss

# devlooped/SponsorLink
  • Loading branch information
devlooped-bot committed Feb 1, 2025
1 parent c0d6736 commit 3aa581e
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
dotnet retest -- --no-build
- name: 🐛 logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: runner.debug && always()
with:
name: logs
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/includes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
jobs:
includes:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: 🤖 defaults
uses: devlooped/actions-bot@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
dotnet retest -- --no-build
- name: 🐛 logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: runner.debug && always()
with:
name: logs
Expand Down
24 changes: 12 additions & 12 deletions .netconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
weak
[file ".github/workflows/build.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
sha = 5e17ad62ebb5241555a7a4d29e3ab15e5ba120d2
sha = 64141f15e2a032f2c167df972206f05615612bd8

etag = f358acb1e45596bf0aad49996017da44939de30b805289c4ad205a7ccb6f99cb
etag = 36d2f759807d55f3aa76e6c64ebbf4ed6616f74cfbb9774634fa7375c895dc12
weak
[file ".github/workflows/changelog.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.yml
Expand All @@ -67,9 +67,9 @@
weak
[file ".github/workflows/publish.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
sha = 5e17ad62ebb5241555a7a4d29e3ab15e5ba120d2
sha = 64141f15e2a032f2c167df972206f05615612bd8

etag = 2cc96046d8f28e7cbcde89ed56d3d89e1a70fb0de7846ee1827bee66b7dfbcf1
etag = d63da2dbd37be35261432991793a4af0749447584406db7468db258bfe5623cb
weak
[file ".gitignore"]
url = https://github.com/devlooped/oss/blob/main/.gitignore
Expand Down Expand Up @@ -128,9 +128,9 @@
weak
[file ".github/workflows/includes.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml
sha = d152e7437fd0d6f6d9363d23cb3b78c07335ea49
sha = 85829f2510f335f4a411867f3dbaaa116c3ab3de

etag = ec40db34f379d0c6d83b2ec15624f330318a172cc4f85b5417c63e86eaf601df
etag = 086f6b6316cc6ea7089c0dcc6980be519e6ed6e6201e65042ef41b82634ec0ee
weak
[file ".github/workflows/combine-prs.yml"]
url = https://github.com/devlooped/oss/blob/main/.github/workflows/combine-prs.yml
Expand Down Expand Up @@ -233,16 +233,16 @@
weak
[file "src/SponsorLink/SponsorLink.Analyzer.Tests.targets"]
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink.Analyzer.Tests.targets
sha = 058dbbc3582042d7fdcaf5741db59d2b46ea1222
sha = df44ccc14cc11b5674c55aca9ba8596bdbcf8438

etag = 2d8bac60892b5565e3419b1fa775c5b977af202304ef3c25a4c6d04c7ac9faf1
etag = a3e9cbcc227dd56a7bed236eaded136f1b80f9f36a4fabce8be695ee844bf881
weak
[file "src/SponsorLink/SponsorLink.Analyzer.targets"]
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink.Analyzer.targets
sha = b7450e6c80efbce65fa2956299f02781cd2dafbe
sha = fb82cf346cea86140a51ae49b9bc730d72f7c7ac


etag = 6f31003e8910d535b2f3cbfcab195db7ced71346f818f45ecd23b5ee9b0dc725
etag = 284f794d03adabf10ac5e25ef87d257821a82eac112efe65d6fe23d675f9af7f
weak
[file "src/SponsorLink/SponsorLink/AnalyzerOptionsExtensions.cs"]
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/AnalyzerOptionsExtensions.cs
Expand Down Expand Up @@ -288,9 +288,9 @@
weak
[file "src/SponsorLink/SponsorLink/SponsorLink.cs"]
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/SponsorLink.cs
sha = efda32a6eaaeffa485fb480e31adfd2f8130bd48
sha = 3f72a9fd35274a659dd380a7d5b747d71b9732a1

etag = 555128f4279241225b4dc8bb2ec8835894edfe9f6b9223399ee8cb3dc7adaf06
etag = 616598e0ecb6d2ce97660aa6ac049e2a31a1c953669743b7b612b61d40c37706
weak
[file "src/SponsorLink/SponsorLink/SponsorLink.csproj"]
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/SponsorLink.csproj
Expand Down
3 changes: 1 addition & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ The versioning scheme for packages is:

<!-- sponsors.md -->
[![Clarius Org](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/clarius.png "Clarius Org")](https://github.com/clarius)
[![Kirill Osenkov](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KirillOsenkov.png "Kirill Osenkov")](https://github.com/KirillOsenkov)
[![MFB Technologies, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MFB-Technologies-Inc.png "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc)
[![Torutek](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/torutek-gh.png "Torutek")](https://github.com/torutek-gh)
[![DRIVE.NET, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/drivenet.png "DRIVE.NET, Inc.")](https://github.com/drivenet)
Expand All @@ -91,7 +90,6 @@ The versioning scheme for packages is:
[![Charley Wu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/akunzai.png "Charley Wu")](https://github.com/akunzai)
[![Jakob Tikjøb Andersen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jakobt.png "Jakob Tikjøb Andersen")](https://github.com/jakobt)
[![Tino Hager](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tinohager.png "Tino Hager")](https://github.com/tinohager)
[![Mark Seemann](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ploeh.png "Mark Seemann")](https://github.com/ploeh)
[![Ken Bonny](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KenBonny.png "Ken Bonny")](https://github.com/KenBonny)
[![Simon Cropp](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/SimonCropp.png "Simon Cropp")](https://github.com/SimonCropp)
[![agileworks-eu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agileworks-eu.png "agileworks-eu")](https://github.com/agileworks-eu)
Expand All @@ -102,6 +100,7 @@ The versioning scheme for packages is:
[![4OTC](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/4OTC.png "4OTC")](https://github.com/4OTC)
[![Vincent Limo](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/v-limo.png "Vincent Limo")](https://github.com/v-limo)
[![Jordan S. Jones](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jordansjones.png "Jordan S. Jones")](https://github.com/jordansjones)
[![domischell](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/DominicSchell.png "domischell")](https://github.com/DominicSchell)


<!-- sponsors.md -->
Expand Down
18 changes: 14 additions & 4 deletions src/SponsorLink/SponsorLink.Analyzer.Tests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<ItemGroup Condition="'$(ManagePackageVersionsCentrally)' == 'true'">
<PackageReference Include="Humanizer.Core" VersionOverride="2.14.1" PrivateAssets="all" Pack="false" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.0.1" PrivateAssets="all" Pack="false" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.1" PrivateAssets="all" Pack="false" />
</ItemGroup>

<ItemGroup Condition="'$(ManagePackageVersionsCentrally)' != 'true'">
<PackageReference Include="Humanizer.Core" Version="2.14.1" PrivateAssets="all" Pack="false" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.0.1" PrivateAssets="all" Pack="false" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.1" PrivateAssets="all" Pack="false" />
</ItemGroup>

<Target Name="AddSponsorLinkAnalyzerDependencies" BeforeTargets="CoreCompile" DependsOnTargets="ResolveLockFileCopyLocalFiles">
Expand All @@ -21,19 +21,29 @@
<ReferenceCopyLocalAssemblies Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' == '.dll'
And !$([MSBuild]::ValueOrDefault('%(FileName)', '').EndsWith('.resources', StringComparison.OrdinalIgnoreCase))
And !$([MSBuild]::ValueOrDefault('%(FileName)', '').StartsWith('ThisAssembly', StringComparison.OrdinalIgnoreCase))" />
<Analyzer Include="@(ReferenceCopyLocalAssemblies)" Condition="

<CandidateAnalyzer Include="@(ReferenceCopyLocalAssemblies)" Condition="
!$([MSBuild]::ValueOrDefault('%(FileName)', '').StartsWith('Microsoft.CodeAnalysis', StringComparison.OrdinalIgnoreCase)) And
!$([MSBuild]::ValueOrDefault('%(FileName)', '').StartsWith('Microsoft.CSharp', StringComparison.OrdinalIgnoreCase)) And
!$([MSBuild]::ValueOrDefault('%(FileName)', '').StartsWith('System.', StringComparison.OrdinalIgnoreCase))"
/>
<!-- Brings in System/Microsoft.IdentityModel, System.Text.Encodings.Web, System.Text.Json, Humanizer -->
<Analyzer Include="@(ReferenceCopyLocalAssemblies)" Condition="
<CandidateAnalyzer Include="@(ReferenceCopyLocalAssemblies)" Condition="
$([MSBuild]::ValueOrDefault('%(FileName)', '').StartsWith('System.IdentityModel', StringComparison.OrdinalIgnoreCase)) Or
$([MSBuild]::ValueOrDefault('%(FileName)', '').StartsWith('Microsoft.IdentityModel', StringComparison.OrdinalIgnoreCase)) Or
$([MSBuild]::ValueOrDefault('%(FileName)', '').StartsWith('System.Text', StringComparison.OrdinalIgnoreCase)) Or
$([MSBuild]::ValueOrDefault('%(FileName)', '').StartsWith('Humanizer', StringComparison.OrdinalIgnoreCase))"
/>
</ItemGroup>

<ItemGroup>
<UniqueCandidateAnalyzer Include="@(CandidateAnalyzer -> Distinct())" />
<UniqueCandidateAnalyzer>
<NetStandard>$([MSBuild]::ValueOrDefault('%(FullPath)', '').Replace('net6.0', 'netstandard2.0').Replace('net8.0', 'netstandard2.0').Replace('netcoreapp3.1', 'netstandard2.0'))</NetStandard>
</UniqueCandidateAnalyzer>
<!-- Analyzer assemblies cannot target anything other than NS2.0 -->
<Analyzer Include="@(UniqueCandidateAnalyzer -> '%(NetStandard)')" Condition="Exists('%(UniqueCandidateAnalyzer.NetStandard)')"/>
</ItemGroup>
</Target>

</Project>
4 changes: 2 additions & 2 deletions src/SponsorLink/SponsorLink.Analyzer.targets
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@
<ItemGroup Condition="'$(ManagePackageVersionsCentrally)' == 'true'">
<PackageReference Include="Humanizer.Core" VersionOverride="2.14.1" PrivateAssets="all" Pack="$(PackMergedAssemblies)" />
<PackageReference Include="Humanizer.Core.es" VersionOverride="2.14.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" VersionOverride="8.2.0" PrivateAssets="all" Pack="$(PackMergedAssemblies)" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" VersionOverride="8.2.1" PrivateAssets="all" Pack="$(PackMergedAssemblies)" />
<PackageReference Include="ILRepack" Version="2.0.35" VersionOverride="all" PrivateAssets="all" Pack="false" />
</ItemGroup>

<ItemGroup Condition="'$(ManagePackageVersionsCentrally)' != 'true'">
<PackageReference Include="Humanizer.Core" Version="2.14.1" PrivateAssets="all" Pack="$(PackMergedAssemblies)" />
<PackageReference Include="Humanizer.Core.es" Version="2.14.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.0" PrivateAssets="all" Pack="$(PackMergedAssemblies)" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.1" PrivateAssets="all" Pack="$(PackMergedAssemblies)" />
<PackageReference Include="ILRepack" Version="2.0.35" PrivateAssets="all" Pack="false" />
</ItemGroup>

Expand Down
9 changes: 9 additions & 0 deletions src/SponsorLink/SponsorLink/SponsorLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ public static IncrementalValueProvider<StatusOptions> GetStatusOptions(this Incr
=> context.GetSponsorAdditionalFiles().Combine(context.AnalyzerConfigOptionsProvider)
.Select((source, _) => new StatusOptions(source.Left, source.Right.GlobalOptions));

/// <summary>
/// Gets the status options for use within a source generator, to avoid depending on
/// analyzer runs. Used in combination with <see cref="DiagnosticsManager.GetOrSetStatus(StatusOptions)"/>.
/// </summary>
public static StatusOptions GetStatusOptions(this GeneratorExecutionContext context)
=> new StatusOptions(
context.AdditionalFiles.Where(x => x.IsSponsorManifest(context.AnalyzerConfigOptions) || x.IsSponsorableAnalyzer(context.AnalyzerConfigOptions)).ToImmutableArray(),
context.AnalyzerConfigOptions.GlobalOptions);

static bool IsSponsorManifest(this AdditionalText text, AnalyzerConfigOptionsProvider provider)
=> provider.GetOptions(text).TryGetValue("build_metadata.SponsorManifest.ItemType", out var itemType) &&
itemType == "SponsorManifest" &&
Expand Down

0 comments on commit 3aa581e

Please sign in to comment.