Cleaned up
This commit is contained in:
parent
9c3e2a25c0
commit
2d4bdbceeb
5
MycroForge.CLI/scripts/publish-nuget.sh
Normal file
5
MycroForge.CLI/scripts/publish-nuget.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
dotnet pack -v d
|
||||
|
||||
dotnet nuget push nupkg/MycroForge.CLI.1.0.0.nupkg --source devdisciples
|
@ -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
|
||||
```
|
@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<!-- The package metadata. Fill in the properties marked as TODO below -->
|
||||
<!-- Follow the instructions on https://learn.microsoft.com/nuget/create-packages/package-authoring-best-practices -->
|
||||
<PackageId>MycroForge.Package.PluginTemplate</PackageId>
|
||||
<PackageId>MycroForge.PluginTemplate.Package</PackageId>
|
||||
<PackageVersion>1.0</PackageVersion>
|
||||
<Title>A template for generating MycroForge plugins</Title>
|
||||
<Authors>Donné Napo</Authors>
|
@ -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`
|
@ -1,6 +0,0 @@
|
||||
namespace MycroForge.TestPlugin;
|
||||
|
||||
public static class Constants
|
||||
{
|
||||
public const string MainCommandName = "mj";
|
||||
}
|
@ -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<RootCommand>
|
||||
{
|
||||
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!"
|
||||
);
|
||||
}
|
||||
}
|
@ -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<ISubCommandOf<RootCommand>, MyJewelleryCommand>();
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MycroForge.Core\MycroForge.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -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
|
||||
|
@ -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
|
||||
```
|
Loading…
Reference in New Issue
Block a user