Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: generated attribute
  • Loading branch information
Flash0ver committed Jul 9, 2025
commit 19284af2ecb3f693b6ae9d157fd726a49ecd87b6
9 changes: 4 additions & 5 deletions src/Sentry.SourceGenerators/BuildPropertySourceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,16 @@ public void Execute(GeneratorExecutionContext context)
var sb = new StringBuilder();
sb
.Append(
"""
$$"""
// <auto-generated>
// Code generated by Sentry Source Generators
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// This code was generated by Sentry.SourceGenerators.
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
// </auto-generated>

#if NET5_0_OR_GREATER
namespace Sentry.Generated
{
[global::System.Runtime.CompilerServices.CompilerGenerated]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("{{GeneratedCodeText.Tool}}", "{{GeneratedCodeText.Version}}")]
public static class BuildPropertyInitializer
{
[global::System.Runtime.CompilerServices.ModuleInitializer]
Expand Down
7 changes: 7 additions & 0 deletions src/Sentry.SourceGenerators/GeneratedCodeText.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Sentry.SourceGenerators;

internal static class GeneratedCodeText
{
public static string? Tool { get; } = typeof(BuildPropertySourceGenerator).Assembly.GetName().Name;
public static string? Version { get; } = typeof(BuildPropertySourceGenerator).Assembly.GetName().Version?.ToString();
}
Loading