Skip to content

Commit c77f0c7

Browse files
committed
Merge remote-tracking branch 'github/main'
2 parents 9a1dfea + 27bb965 commit c77f0c7

File tree

9 files changed

+24
-19
lines changed

9 files changed

+24
-19
lines changed

Build.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
param (
22
[switch]$Build,
33
[switch]$Licensing,
4-
[switch]$Pack
4+
[switch]$Pack,
5+
[switch]$Publish
56
)
67

78
# Load Toolkit
@@ -25,4 +26,8 @@ if ($Pack) {
2526
Invoke-PackAll -Symbols
2627
}
2728

28-
Write-Host "Success!"
29+
if ($Publish) {
30+
dotnet nuget push "artifacts/packages/" --api-key $MORYX_NUGET_APIKEY --source $MORYX_PACKAGE_TARGET --skip-duplicate --symbol-api-key $MORYX_NUGET_APIKEY --symbol-source $MORYX_PACKAGE_TARGET_V3
31+
}
32+
33+
Write-Host "Success!"

Moryx.Cli.sln.DotSettings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Moryx/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

src/Moryx.Cli.Commands/CreateNew.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
using Moryx.Cli.Commands.Options;
22
using Moryx.Cli.Templates.Extensions;
3-
using System.Diagnostics.CodeAnalysis;
43
using Moryx.Cli.Commands.Extensions;
54
using Moryx.Cli.Templates;
65

76
namespace Moryx.Cli.Commands
87
{
98
public static class CreateNew
109
{
11-
public static CommandResult Solution(NewOptions options, [NotNull] Action<string> onStatus)
10+
public static CommandResult Solution(NewOptions options, Action<string> onStatus)
1211
{
1312
var solutionName = options.Name!;
1413
var dir = Path.Combine(Directory.GetCurrentDirectory(), solutionName);
@@ -86,12 +85,12 @@ private static void InitializeGitRepo(string solutionName, Action<string> onStat
8685
{
8786
var initialDirectory = Environment.CurrentDirectory;
8887
Directory.SetCurrentDirectory(Path.Combine(Environment.CurrentDirectory, solutionName));
89-
var result = TemplateRepository.ExecCommanLine("git init", onStatus);
88+
var result = TemplateRepository.ExecCommandLine("git init", onStatus);
9089
if (result == 0)
9190
{
92-
TemplateRepository.ExecCommanLine("git checkout -b main", onStatus);
93-
TemplateRepository.ExecCommanLine("git add --all", onStatus);
94-
TemplateRepository.ExecCommanLine($"git commit -am \"Initial commit for {solutionName}\"", onStatus);
91+
TemplateRepository.ExecCommandLine("git checkout -b main", onStatus);
92+
TemplateRepository.ExecCommandLine("git add --all", onStatus);
93+
TemplateRepository.ExecCommandLine($"git commit -am \"Initial commit for {solutionName}\"", onStatus);
9594
onStatus("Initialized Git repository");
9695
}
9796
else

src/Moryx.Cli.Commands/ExecCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Moryx.Cli.Commands.Options;
1+
using System.Net;
2+
using Moryx.Cli.Commands.Options;
23
using System.Net;
34
using System.Net.Http.Json;
45

@@ -55,6 +56,7 @@ internal static CommandResult PostSetup(ExecOptions options)
5556
internal class ModuleResponse
5657
{
5758
public string? Name { get; set; }
59+
5860
public string? HealthState { get; set; }
5961
}
6062
}

src/Moryx.Cli.Commands/Extensions/CommandResultExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
{
33
internal static class CommandResultExtensions
44
{
5-
internal static CommandResult Flatten(this CommandResult[] results) {
5+
internal static CommandResult Flatten(this CommandResult[] results)
6+
{
67
if (results.Any(r => r.Errors.Count > 0))
78
{
89
return CommandResult.WithError(string.Join("\n", results.Select(r => string.Join("\n", r.Errors))));

src/Moryx.Cli.Templates/TemplateRepository.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ public static int Clone(TemplateSettings settings, Action<string>? onStatus = nu
1616

1717
if (!Directory.Exists(targetDir) || Directory.GetFiles(targetDir).Length == 0)
1818
{
19-
return ExecCommanLine($"git clone {settings.Repository} -b {settings.Branch} --depth 1 --single-branch {targetDir}", _ => onStatus?.Invoke(_));
19+
return ExecCommandLine($"git clone {settings.Repository} -b {settings.Branch} --depth 1 --single-branch {targetDir}", _ => onStatus?.Invoke(_));
2020
}
2121
else if (settings.Pull)
2222
{
23-
return ExecCommanLine($"git -C {targetDir} pull", _ => onStatus?.Invoke(_));
23+
return ExecCommandLine($"git -C {targetDir} pull", _ => onStatus?.Invoke(_));
2424
}
2525
return 0;
2626
}
2727

28-
public static int ExecCommanLine(string command, Action<string> onStatus)
28+
public static int ExecCommandLine(string command, Action<string> onStatus)
2929
{
3030
var process = new Process
3131
{

src/Moryx.Cli/CommandLine/Exec.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace Moryx.Cli.CommandLine
99
[Description("Executes a command against a running MORYX instance.")]
1010
internal class Exec : Command<Exec.Settings>
1111
{
12-
1312
internal class Settings : CommandSettings
1413
{
1514
[Description("Command to be executed agains a running MORYX instance")]

src/Moryx.Cli/CommandLine/New.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace Moryx.Cli.CommandLine
1010
[Description("Creates a new MORYX application project <NAME>.")]
1111
internal class New : Command<New.Settings>
1212
{
13-
1413
internal class Settings : CommandSettings
1514
{
1615
[Description("Name of the project. Recommended to be PascalCase.")]

src/Moryx.Cli/Program.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ namespace Moryx.Cli
55
{
66
internal class Program
77
{
8-
9-
static void Main(string[] args)
8+
private static void Main(string[] args)
109
{
11-
var app = new CommandApp()
12-
.Setup();
10+
var app = new CommandApp().Setup();
1311
app.Run(args);
1412
}
1513
}

0 commit comments

Comments
 (0)