From dc07ffae518015cde17f0f3e9ee7fa567b9a2243 Mon Sep 17 00:00:00 2001 From: hzhang Date: Thu, 6 Feb 2025 01:30:53 +0000 Subject: [PATCH] improve: rename project --- .../.idea/.gitignore | 13 --------- .../.idea/encodings.xml | 4 --- .../.idea/indexLayout.xml | 8 ------ .../.idea/vcs.xml | 6 ---- AssetInfo.cs | 4 +-- AssetProcessGenerator.cs | 2 +- AssetRegisterGenerator.cs | 6 ++-- ClassSyntaxReceiver.cs | 2 +- GlobalRegistryGenerator.cs | 6 ++-- Hangman.SDK.Generators.csproj | 28 ------------------- ....Generators.sln => Polonium.Generators.sln | 0 publish | 2 ++ 12 files changed, 10 insertions(+), 71 deletions(-) delete mode 100644 .idea/.idea.Hangman.SDK.Generators/.idea/.gitignore delete mode 100644 .idea/.idea.Hangman.SDK.Generators/.idea/encodings.xml delete mode 100644 .idea/.idea.Hangman.SDK.Generators/.idea/indexLayout.xml delete mode 100644 .idea/.idea.Hangman.SDK.Generators/.idea/vcs.xml delete mode 100644 Hangman.SDK.Generators.csproj rename Hangman.SDK.Generators.sln => Polonium.Generators.sln (100%) create mode 100644 publish diff --git a/.idea/.idea.Hangman.SDK.Generators/.idea/.gitignore b/.idea/.idea.Hangman.SDK.Generators/.idea/.gitignore deleted file mode 100644 index f8a3511..0000000 --- a/.idea/.idea.Hangman.SDK.Generators/.idea/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/contentModel.xml -/modules.xml -/.idea.Hangman.SDK.Generators.iml -/projectSettingsUpdater.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/.idea.Hangman.SDK.Generators/.idea/encodings.xml b/.idea/.idea.Hangman.SDK.Generators/.idea/encodings.xml deleted file mode 100644 index df87cf9..0000000 --- a/.idea/.idea.Hangman.SDK.Generators/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/.idea.Hangman.SDK.Generators/.idea/indexLayout.xml b/.idea/.idea.Hangman.SDK.Generators/.idea/indexLayout.xml deleted file mode 100644 index 7b08163..0000000 --- a/.idea/.idea.Hangman.SDK.Generators/.idea/indexLayout.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/.idea.Hangman.SDK.Generators/.idea/vcs.xml b/.idea/.idea.Hangman.SDK.Generators/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/.idea.Hangman.SDK.Generators/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AssetInfo.cs b/AssetInfo.cs index a2a21c7..cca6296 100644 --- a/AssetInfo.cs +++ b/AssetInfo.cs @@ -1,11 +1,9 @@ -namespace Hangman.SDK.Generators; - +namespace Polonium.Generators; using System; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; - public struct AssetInfo { public INamedTypeSymbol Symbol; diff --git a/AssetProcessGenerator.cs b/AssetProcessGenerator.cs index edd1237..7dbe304 100644 --- a/AssetProcessGenerator.cs +++ b/AssetProcessGenerator.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; using Microsoft.CodeAnalysis; -namespace Hangman.SDK.Generators; +namespace Polonium.Generators; public abstract class AssetProcessGenerator : ISourceGenerator { diff --git a/AssetRegisterGenerator.cs b/AssetRegisterGenerator.cs index c29bf21..cbad384 100644 --- a/AssetRegisterGenerator.cs +++ b/AssetRegisterGenerator.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using Microsoft.CodeAnalysis; -namespace Hangman.SDK.Generators; +namespace Polonium.Generators; [Generator] public class AssetRegisterGenerator : AssetProcessGenerator { @@ -15,11 +15,10 @@ public class AssetRegisterGenerator : AssetProcessGenerator return; Compilation compilation = context.Compilation; StringBuilder sb = new(); - sb .AppendLine("using System;") .AppendLine("using Godot;") - .AppendLine("using Hangman.SDK.Attributes;") + .AppendLine("using Polonium.Attributes;") .AppendLine("[AutoRegister]") .AppendLine("public static class AssetRegister") .AppendLine("{") @@ -45,7 +44,6 @@ public class AssetRegisterGenerator : AssetProcessGenerator ); } } - sb .AppendLine(" }") .AppendLine("}"); diff --git a/ClassSyntaxReceiver.cs b/ClassSyntaxReceiver.cs index da7824f..d07047f 100644 --- a/ClassSyntaxReceiver.cs +++ b/ClassSyntaxReceiver.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace Hangman.SDK.Generators; +namespace Polonium.Generators; public class ClassSyntaxReceiver : ISyntaxReceiver { diff --git a/GlobalRegistryGenerator.cs b/GlobalRegistryGenerator.cs index 30b9106..73a651e 100644 --- a/GlobalRegistryGenerator.cs +++ b/GlobalRegistryGenerator.cs @@ -1,7 +1,7 @@ using System.Text; using Microsoft.CodeAnalysis; -namespace Hangman.SDK.Generators; +namespace Polonium.Generators; [Generator] public class GlobalRegistryGenerator : ISourceGenerator { @@ -18,8 +18,8 @@ public class GlobalRegistryGenerator : ISourceGenerator .AppendLine("using System.Collections.Generic;") .AppendLine("using System.Linq;") .AppendLine("using System.Reflection;") - .AppendLine("using Hangman.SDK.Attributes;") - .AppendLine("using Hangman.SDK;") + .AppendLine("using Polonium.Attributes;") + .AppendLine("using Polonium;") .AppendLine("public static partial class GlobalRegistry") .AppendLine("{") .AppendLine(" public static void Register()") diff --git a/Hangman.SDK.Generators.csproj b/Hangman.SDK.Generators.csproj deleted file mode 100644 index 446af74..0000000 --- a/Hangman.SDK.Generators.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - netstandard2.0 - true - enable - latest - - true - true - - Hangman.SDK.Generators - Hangman.SDK.Generators - true - 0.0.1 - Hangman - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - diff --git a/Hangman.SDK.Generators.sln b/Polonium.Generators.sln similarity index 100% rename from Hangman.SDK.Generators.sln rename to Polonium.Generators.sln diff --git a/publish b/publish new file mode 100644 index 0000000..296f154 --- /dev/null +++ b/publish @@ -0,0 +1,2 @@ +#!/bin/bash +dotnet nuget push "$(ls -t ./bin/Debug/Hangman.SDK.Generators.*.nupkg | head -n 1)" --source hangman-lab \ No newline at end of file