From 4c877ce246a12e07875658874cb2d082494c4b17 Mon Sep 17 00:00:00 2001 From: LPeter1997 Date: Mon, 16 Jan 2023 21:25:06 +0100 Subject: [PATCH] Deployment fix (#182) * Non-packable * Made attributes don't compile * Update publish.yaml * Update Draco.Compiler.csproj * Update Directory.Build.props --- .github/workflows/publish.yaml | 2 +- src/Directory.Build.props | 2 +- src/Draco.Compiler.Cli/Draco.Compiler.Cli.csproj | 3 ++- src/Draco.Compiler.Tasks/Draco.Compiler.Tasks.csproj | 3 ++- src/Draco.Compiler/Draco.Compiler.csproj | 5 ++++- src/Draco.RedGreenTree.Attributes/GreenTreeAttribute.cs | 2 ++ src/Draco.RedGreenTree.Attributes/IgnoreAttribute.cs | 2 ++ src/Draco.RedGreenTree.Attributes/RedTreeAttribute.cs | 2 ++ src/Draco.RedGreenTree.Attributes/SyntaxFactoryAttribute.cs | 2 ++ .../TransformerBaseAttribute.cs | 2 ++ src/Draco.RedGreenTree.Attributes/VisitorBaseAttribute.cs | 2 ++ 11 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 9ae141fbf..0cbd17a55 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -45,4 +45,4 @@ jobs: path: src/**/*${{ github.event.release.tag_name }}.nupkg - name: Upload to NuGet.org - run: dotnet nuget push src/**/*${{ github.event.release.tag_name }}.nupkg --api-key ${{ env.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json --no-symbols true + run: dotnet nuget push src/**/*${{ github.event.release.tag_name }}.nupkg --api-key ${{ env.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json --no-symbols diff --git a/src/Directory.Build.props b/src/Directory.Build.props index a81a9153a..37fd8a7ca 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,6 @@ - 0.1.0-pre + 0.1.1-pre net7.0 diff --git a/src/Draco.Compiler.Cli/Draco.Compiler.Cli.csproj b/src/Draco.Compiler.Cli/Draco.Compiler.Cli.csproj index d7f6dcb59..c4fdb3b88 100644 --- a/src/Draco.Compiler.Cli/Draco.Compiler.Cli.csproj +++ b/src/Draco.Compiler.Cli/Draco.Compiler.Cli.csproj @@ -1,10 +1,11 @@ - + Exe $(DracoToolsTargetFramework) 11 enable + false diff --git a/src/Draco.Compiler.Tasks/Draco.Compiler.Tasks.csproj b/src/Draco.Compiler.Tasks/Draco.Compiler.Tasks.csproj index fefb3afec..d8087e763 100644 --- a/src/Draco.Compiler.Tasks/Draco.Compiler.Tasks.csproj +++ b/src/Draco.Compiler.Tasks/Draco.Compiler.Tasks.csproj @@ -1,8 +1,9 @@ - + netstandard2.0 11 + false diff --git a/src/Draco.Compiler/Draco.Compiler.csproj b/src/Draco.Compiler/Draco.Compiler.csproj index 2570f8909..102e0ceac 100644 --- a/src/Draco.Compiler/Draco.Compiler.csproj +++ b/src/Draco.Compiler/Draco.Compiler.csproj @@ -18,7 +18,10 @@ - + + all + runtime; build; native; contentfiles; analyzers + diff --git a/src/Draco.RedGreenTree.Attributes/GreenTreeAttribute.cs b/src/Draco.RedGreenTree.Attributes/GreenTreeAttribute.cs index 3ab87b6ae..a33a9f6f6 100644 --- a/src/Draco.RedGreenTree.Attributes/GreenTreeAttribute.cs +++ b/src/Draco.RedGreenTree.Attributes/GreenTreeAttribute.cs @@ -1,7 +1,9 @@ using System; +using System.Diagnostics; namespace Draco.RedGreenTree.Attributes; +[Conditional("DRACO_SOURCEGENERATOR_ATTRIBUTE")] [AttributeUsage(AttributeTargets.Class)] public sealed class GreenTreeAttribute : Attribute { diff --git a/src/Draco.RedGreenTree.Attributes/IgnoreAttribute.cs b/src/Draco.RedGreenTree.Attributes/IgnoreAttribute.cs index 76605b8f2..bf4ea6a8a 100644 --- a/src/Draco.RedGreenTree.Attributes/IgnoreAttribute.cs +++ b/src/Draco.RedGreenTree.Attributes/IgnoreAttribute.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; namespace Draco.RedGreenTree.Attributes; @@ -11,6 +12,7 @@ public enum IgnoreFlags SyntaxFactoryConstruct = 1 << 3, } +[Conditional("DRACO_SOURCEGENERATOR_ATTRIBUTE")] [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)] public sealed class IgnoreAttribute : Attribute { diff --git a/src/Draco.RedGreenTree.Attributes/RedTreeAttribute.cs b/src/Draco.RedGreenTree.Attributes/RedTreeAttribute.cs index 117ed8cca..843b4a64d 100644 --- a/src/Draco.RedGreenTree.Attributes/RedTreeAttribute.cs +++ b/src/Draco.RedGreenTree.Attributes/RedTreeAttribute.cs @@ -1,7 +1,9 @@ using System; +using System.Diagnostics; namespace Draco.RedGreenTree.Attributes; +[Conditional("DRACO_SOURCEGENERATOR_ATTRIBUTE")] [AttributeUsage(AttributeTargets.Class)] public sealed class RedTreeAttribute : Attribute { diff --git a/src/Draco.RedGreenTree.Attributes/SyntaxFactoryAttribute.cs b/src/Draco.RedGreenTree.Attributes/SyntaxFactoryAttribute.cs index 12b7a3b28..b390f2dff 100644 --- a/src/Draco.RedGreenTree.Attributes/SyntaxFactoryAttribute.cs +++ b/src/Draco.RedGreenTree.Attributes/SyntaxFactoryAttribute.cs @@ -1,7 +1,9 @@ using System; +using System.Diagnostics; namespace Draco.RedGreenTree.Attributes; +[Conditional("DRACO_SOURCEGENERATOR_ATTRIBUTE")] [AttributeUsage(AttributeTargets.Class)] public sealed class SyntaxFactoryAttribute : Attribute { diff --git a/src/Draco.RedGreenTree.Attributes/TransformerBaseAttribute.cs b/src/Draco.RedGreenTree.Attributes/TransformerBaseAttribute.cs index f0b4fafc2..00ee9727c 100644 --- a/src/Draco.RedGreenTree.Attributes/TransformerBaseAttribute.cs +++ b/src/Draco.RedGreenTree.Attributes/TransformerBaseAttribute.cs @@ -1,7 +1,9 @@ using System; +using System.Diagnostics; namespace Draco.RedGreenTree.Attributes; +[Conditional("DRACO_SOURCEGENERATOR_ATTRIBUTE")] [AttributeUsage(AttributeTargets.Class)] public sealed class TransformerBaseAttribute : Attribute { diff --git a/src/Draco.RedGreenTree.Attributes/VisitorBaseAttribute.cs b/src/Draco.RedGreenTree.Attributes/VisitorBaseAttribute.cs index 401ed596d..1af0e5c3c 100644 --- a/src/Draco.RedGreenTree.Attributes/VisitorBaseAttribute.cs +++ b/src/Draco.RedGreenTree.Attributes/VisitorBaseAttribute.cs @@ -1,7 +1,9 @@ using System; +using System.Diagnostics; namespace Draco.RedGreenTree.Attributes; +[Conditional("DRACO_SOURCEGENERATOR_ATTRIBUTE")] [AttributeUsage(AttributeTargets.Class)] public sealed class VisitorBaseAttribute : Attribute {