fix: allow Nitride.Temporal to be used twice
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
ddebc8e683
commit
d258e52697
1
Justfile
1
Justfile
|
@ -100,6 +100,7 @@ release-tag: release-setup
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euxo pipefail
|
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))
|
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
|
for i in src/*/GitVersion.yml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<clear />
|
<clear />
|
||||||
|
|
|
@ -4,17 +4,32 @@ namespace MfGames.Nitride.Temporal.Setup;
|
||||||
|
|
||||||
public class NitrideTemporalModule : Module
|
public class NitrideTemporalModule : Module
|
||||||
{
|
{
|
||||||
|
private static bool loaded;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Load(ContainerBuilder builder)
|
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.RegisterOperators(this);
|
||||||
builder.RegisterValidators(this);
|
builder.RegisterValidators(this);
|
||||||
|
|
||||||
builder.RegisterType<TimeService>()
|
builder
|
||||||
|
.RegisterType<TimeService>()
|
||||||
.AsSelf()
|
.AsSelf()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder.RegisterGeneric(typeof(SetInstantFromComponent<>))
|
builder
|
||||||
|
.RegisterGeneric(typeof(SetInstantFromComponent<>))
|
||||||
.As(typeof(SetInstantFromComponent<>));
|
.As(typeof(SetInstantFromComponent<>));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class BuildCommand : Command, ICommandHandler
|
||||||
this.Handler = this;
|
this.Handler = this;
|
||||||
|
|
||||||
// Handle any injected arguments into the command line.
|
// Handle any injected arguments into the command line.
|
||||||
foreach (IPipelineCommandOption? option in pipelineOptions)
|
foreach (IPipelineCommandOption option in pipelineOptions)
|
||||||
{
|
{
|
||||||
this.AddOption(option.Option);
|
this.AddOption(option.Option);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue