diff --git a/Justfile b/Justfile index 70e2434..9e173ce 100644 --- a/Justfile +++ b/Justfile @@ -100,6 +100,7 @@ release-tag: release-setup #!/usr/bin/env bash set -euxo pipefail + git remote remove publish || true git remote add publish https://dmoonfire:$GITEA_TOKEN@src.mfgames.com/mfgames-cil/$(basename $(git config --get remote.origin.url)) for i in src/*/GitVersion.yml diff --git a/NuGet.Config b/NuGet.Config index 4e800bf..6fe0770 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -1,4 +1,4 @@ - + diff --git a/src/MfGames.Nitride.Temporal/Setup/NitrideTemporalModule.cs b/src/MfGames.Nitride.Temporal/Setup/NitrideTemporalModule.cs index 7609895..ab4a889 100644 --- a/src/MfGames.Nitride.Temporal/Setup/NitrideTemporalModule.cs +++ b/src/MfGames.Nitride.Temporal/Setup/NitrideTemporalModule.cs @@ -4,17 +4,32 @@ namespace MfGames.Nitride.Temporal.Setup; public class NitrideTemporalModule : Module { + private static bool loaded; + /// protected override void Load(ContainerBuilder builder) { + // Make sure our module isn't loaded more than once. This can happen + // if another module requires this one and the user adds this module + // to customize settings. + if (loaded) + { + return; + } + + loaded = true; + + // Make sure our module isn't loaded more than once. builder.RegisterOperators(this); builder.RegisterValidators(this); - builder.RegisterType() + builder + .RegisterType() .AsSelf() .SingleInstance(); - builder.RegisterGeneric(typeof(SetInstantFromComponent<>)) + builder + .RegisterGeneric(typeof(SetInstantFromComponent<>)) .As(typeof(SetInstantFromComponent<>)); } } diff --git a/src/MfGames.Nitride/Commands/BuildCommand.cs b/src/MfGames.Nitride/Commands/BuildCommand.cs index d980d6c..ab95e9f 100644 --- a/src/MfGames.Nitride/Commands/BuildCommand.cs +++ b/src/MfGames.Nitride/Commands/BuildCommand.cs @@ -32,7 +32,7 @@ public class BuildCommand : Command, ICommandHandler this.Handler = this; // Handle any injected arguments into the command line. - foreach (IPipelineCommandOption? option in pipelineOptions) + foreach (IPipelineCommandOption option in pipelineOptions) { this.AddOption(option.Option); }