diff --git a/MycroForge.CLI/scripts/publish-nuget.sh b/MycroForge.CLI/scripts/publish-nuget.sh new file mode 100644 index 0000000..25ae9c7 --- /dev/null +++ b/MycroForge.CLI/scripts/publish-nuget.sh @@ -0,0 +1,5 @@ +#!/usr/bin/bash + +dotnet pack -v d + +dotnet nuget push nupkg/MycroForge.CLI.1.0.0.nupkg --source devdisciples diff --git a/MycroForge.Core/README.md b/MycroForge.Core/README.md index c2145b2..be1f784 100644 --- a/MycroForge.Core/README.md +++ b/MycroForge.Core/README.md @@ -2,5 +2,5 @@ ```shell dotnet build -r Release -dotnet nuget push --source gitea bin/Release/MycroForge.Core.1.0.0.nupkg +dotnet nuget push --source devdisciples bin/Release/MycroForge.Core.1.0.0.nupkg ``` \ No newline at end of file diff --git a/MycroForge.Package.PluginTemplate/templates/.gitkeep b/MycroForge.Package.PluginTemplate/templates/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/MycroForge.Package.PluginTemplate/.gitignore b/MycroForge.PluginTemplate.Package/.gitignore similarity index 100% rename from MycroForge.Package.PluginTemplate/.gitignore rename to MycroForge.PluginTemplate.Package/.gitignore diff --git a/MycroForge.Package.PluginTemplate/MycroForge.Package.PluginTemplate.csproj b/MycroForge.PluginTemplate.Package/MycroForge.PluginTemplate.Package.csproj similarity index 94% rename from MycroForge.Package.PluginTemplate/MycroForge.Package.PluginTemplate.csproj rename to MycroForge.PluginTemplate.Package/MycroForge.PluginTemplate.Package.csproj index ed27362..8c0d691 100644 --- a/MycroForge.Package.PluginTemplate/MycroForge.Package.PluginTemplate.csproj +++ b/MycroForge.PluginTemplate.Package/MycroForge.PluginTemplate.Package.csproj @@ -3,7 +3,7 @@ - MycroForge.Package.PluginTemplate + MycroForge.PluginTemplate.Package 1.0 A template for generating MycroForge plugins Donné Napo diff --git a/MycroForge.Package.PluginTemplate/README.md b/MycroForge.PluginTemplate.Package/README.md similarity index 64% rename from MycroForge.Package.PluginTemplate/README.md rename to MycroForge.PluginTemplate.Package/README.md index eea6aa7..2b652bd 100644 --- a/MycroForge.Package.PluginTemplate/README.md +++ b/MycroForge.PluginTemplate.Package/README.md @@ -9,7 +9,7 @@ https://learn.microsoft.com/en-us/dotnet/core/tutorials/cli-templates-create-tem `dotnet pack` ### Push to local nuget -`dotnet nuget push bin/Release/MycroForge.Package.PluginTemplate.1.0.0.nupkg --source gitea` +`dotnet nuget push bin/Release/MycroForge.PluginTemplate.Package.1.0.0.nupkg --source devdisciples` ### Install template package from local nuget -`dotnet new install MycroForge.Package.PluginTemplate --nuget-source gitea` +`dotnet new install MycroForge.PluginTemplate.Package --nuget-source devdisciples` diff --git a/MycroForge.Package.PluginTemplate/scripts/build_package.sh b/MycroForge.PluginTemplate.Package/scripts/build_package.sh similarity index 100% rename from MycroForge.Package.PluginTemplate/scripts/build_package.sh rename to MycroForge.PluginTemplate.Package/scripts/build_package.sh diff --git a/MycroForge.TestPlugin/Constants.cs b/MycroForge.TestPlugin/Constants.cs deleted file mode 100644 index b7b25f7..0000000 --- a/MycroForge.TestPlugin/Constants.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace MycroForge.TestPlugin; - -public static class Constants -{ - public const string MainCommandName = "mj"; -} \ No newline at end of file diff --git a/MycroForge.TestPlugin/MyJewelleryCommand.cs b/MycroForge.TestPlugin/MyJewelleryCommand.cs deleted file mode 100644 index 7dd07e9..0000000 --- a/MycroForge.TestPlugin/MyJewelleryCommand.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.CommandLine; -using MycroForge.Core; -using MycroForge.Core.Contract; -using RootCommand = MycroForge.Core.RootCommand; - -namespace MycroForge.TestPlugin; - -public class MyJewelleryCommand : Command, ISubCommandOf -{ - private readonly ProjectContext _context; - - public MyJewelleryCommand(ProjectContext context) : - base(Constants.MainCommandName, "Custom command for My Jewellery specific stuff") - { - _context = context; - this.SetHandler(ExecuteAsync); - } - - private async Task ExecuteAsync() - { - await _context.CreateFile("hello_world.txt", - "My Jewellery command plugin is working!" - ); - } -} \ No newline at end of file diff --git a/MycroForge.TestPlugin/MyJewelleryCommandPlugin.cs b/MycroForge.TestPlugin/MyJewelleryCommandPlugin.cs deleted file mode 100644 index 44da488..0000000 --- a/MycroForge.TestPlugin/MyJewelleryCommandPlugin.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using MycroForge.Core.Contract; -using RootCommand = MycroForge.Core.RootCommand; - -namespace MycroForge.TestPlugin; - -public class MyJewelleryCommandPlugin : ICommandPlugin -{ - public string Name => $"{nameof(MycroForge)}.{nameof(TestPlugin)}"; - public string Command => Constants.MainCommandName; - - public void RegisterServices(IServiceCollection services) - { - services.AddScoped, MyJewelleryCommand>(); - } -} \ No newline at end of file diff --git a/MycroForge.TestPlugin/MycroForge.TestPlugin.csproj b/MycroForge.TestPlugin/MycroForge.TestPlugin.csproj deleted file mode 100644 index bae31e8..0000000 --- a/MycroForge.TestPlugin/MycroForge.TestPlugin.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - diff --git a/MycroForge.sln b/MycroForge.sln index 8012ccf..6fb7fac 100644 --- a/MycroForge.sln +++ b/MycroForge.sln @@ -4,10 +4,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MycroForge.CLI", "MycroForg EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MycroForge.Core", "MycroForge.Core\MycroForge.Core.csproj", "{CFF8BD4E-520D-4319-BA80-3F49B5F493BA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MycroForge.TestPlugin", "MycroForge.TestPlugin\MycroForge.TestPlugin.csproj", "{7C479E68-98FA-4FBC-B5E4-7116015774B3}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MycroForge.PluginTemplate", "MycroForge.PluginTemplate\MycroForge.PluginTemplate.csproj", "{114A2B34-D77E-42AE-ADAF-0CD68C7B8D32}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MycroForge.PluginTemplate.Package", "MycroForge.PluginTemplate.Package\MycroForge.PluginTemplate.Package.csproj", "{1C5C5B9A-3C90-4FE7-A1AC-2F46C3CD0D69}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -22,13 +22,13 @@ Global {CFF8BD4E-520D-4319-BA80-3F49B5F493BA}.Debug|Any CPU.Build.0 = Debug|Any CPU {CFF8BD4E-520D-4319-BA80-3F49B5F493BA}.Release|Any CPU.ActiveCfg = Release|Any CPU {CFF8BD4E-520D-4319-BA80-3F49B5F493BA}.Release|Any CPU.Build.0 = Release|Any CPU - {7C479E68-98FA-4FBC-B5E4-7116015774B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7C479E68-98FA-4FBC-B5E4-7116015774B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7C479E68-98FA-4FBC-B5E4-7116015774B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7C479E68-98FA-4FBC-B5E4-7116015774B3}.Release|Any CPU.Build.0 = Release|Any CPU {114A2B34-D77E-42AE-ADAF-0CD68C7B8D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {114A2B34-D77E-42AE-ADAF-0CD68C7B8D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {114A2B34-D77E-42AE-ADAF-0CD68C7B8D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {114A2B34-D77E-42AE-ADAF-0CD68C7B8D32}.Release|Any CPU.Build.0 = Release|Any CPU + {1C5C5B9A-3C90-4FE7-A1AC-2F46C3CD0D69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C5C5B9A-3C90-4FE7-A1AC-2F46C3CD0D69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C5C5B9A-3C90-4FE7-A1AC-2F46C3CD0D69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C5C5B9A-3C90-4FE7-A1AC-2F46C3CD0D69}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/README.md b/README.md index 7d05eaa..d36d06e 100644 --- a/README.md +++ b/README.md @@ -25,5 +25,5 @@ Run the install script in the same directory as the downloaded zip. See the exam ### Add DevDisciples NuGet source ```bash -dotnet nuget add source --name gitea --username username --password password https://git.devdisciples.com/api/packages/devdisciples/nuget/index.json --store-password-in-clear-text +dotnet nuget add source --name devdisciples --username username --password password https://git.devdisciples.com/api/packages/devdisciples/nuget/index.json --store-password-in-clear-text ``` \ No newline at end of file