mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
28 lines
792 B
C#
28 lines
792 B
C#
using static SimpleExec.Command;
|
|
|
|
namespace BuildTool.Modules;
|
|
|
|
class BeefWorkspaceModule : Module
|
|
{
|
|
public static readonly string ModuleName = "BeefWorkspace";
|
|
|
|
public override string Name => ModuleName;
|
|
|
|
public override List<Type> DependencyTypes => [typeof(GlitchyEngineHelperModule), typeof(Box2DModule), typeof(FreetypeStackModule)];
|
|
|
|
public override async Task<bool> Run(BuildInfo buildInfo)
|
|
{
|
|
if (buildInfo.BuildDebug)
|
|
{
|
|
await RunAsync("beefbuild", $"-workspace={buildInfo.WorkingDirectory.WorkspaceRoot} -config=debug");
|
|
}
|
|
|
|
if (buildInfo.BuildRelease)
|
|
{
|
|
await RunAsync("beefbuild", $"-workspace={buildInfo.WorkingDirectory.WorkspaceRoot} -config=release");
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|