mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 21:34:11 +02:00
Added -generate option
This commit is contained in:
parent
3e0a507cf7
commit
aa0277485f
2 changed files with 25 additions and 6 deletions
|
@ -15,6 +15,7 @@ namespace BeefBuild
|
||||||
public bool mIsTest;
|
public bool mIsTest;
|
||||||
public bool mTestIncludeIgnored;
|
public bool mTestIncludeIgnored;
|
||||||
public bool mDidRun;
|
public bool mDidRun;
|
||||||
|
public bool mWantsGenerate = false;
|
||||||
|
|
||||||
/*void Test()
|
/*void Test()
|
||||||
{
|
{
|
||||||
|
@ -101,6 +102,19 @@ namespace BeefBuild
|
||||||
|
|
||||||
WorkspaceLoaded();
|
WorkspaceLoaded();
|
||||||
|
|
||||||
|
if (mWantsGenerate)
|
||||||
|
{
|
||||||
|
if (mWorkspace.mStartupProject != null)
|
||||||
|
{
|
||||||
|
if (mWorkspace.mStartupProject.IsEmpty)
|
||||||
|
AutoGenerateStartupCode(mWorkspace.mStartupProject);
|
||||||
|
else
|
||||||
|
OutputErrorLine("The project '{}' is not empty, but '-generate' was specified.", mWorkspace.mStartupProject.mProjectName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mFailed)
|
||||||
|
{
|
||||||
if (mIsTest)
|
if (mIsTest)
|
||||||
{
|
{
|
||||||
RunTests(mTestIncludeIgnored, false);
|
RunTests(mTestIncludeIgnored, false);
|
||||||
|
@ -108,6 +122,7 @@ namespace BeefBuild
|
||||||
else if (mVerb != .New)
|
else if (mVerb != .New)
|
||||||
Compile(.Normal, null);
|
Compile(.Normal, null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override bool HandleCommandLineParam(String key, String value)
|
public override bool HandleCommandLineParam(String key, String value)
|
||||||
{
|
{
|
||||||
|
@ -121,6 +136,9 @@ namespace BeefBuild
|
||||||
case "-new":
|
case "-new":
|
||||||
mVerb = .New;
|
mVerb = .New;
|
||||||
return true;
|
return true;
|
||||||
|
case "-generate":
|
||||||
|
mWantsGenerate = true;
|
||||||
|
return true;
|
||||||
case "-run":
|
case "-run":
|
||||||
if (mVerbosity == .Default)
|
if (mVerbosity == .Default)
|
||||||
mVerbosity = .Minimal;
|
mVerbosity = .Minimal;
|
||||||
|
@ -268,7 +286,7 @@ namespace BeefBuild
|
||||||
|
|
||||||
if ((!IsCompiling) && (!AreTestsRunning()))
|
if ((!IsCompiling) && (!AreTestsRunning()))
|
||||||
{
|
{
|
||||||
if ((mVerb == .Run) && (!mDidRun))
|
if ((mVerb == .Run) && (!mDidRun) && (!mFailed))
|
||||||
{
|
{
|
||||||
let curPath = scope String();
|
let curPath = scope String();
|
||||||
Directory.GetCurrentDirectory(curPath);
|
Directory.GetCurrentDirectory(curPath);
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace BeefBuild
|
||||||
BeefBuild [args]
|
BeefBuild [args]
|
||||||
If no arguments are specified, a build will occur using current working directory as the workspace.
|
If no arguments are specified, a build will occur using current working directory as the workspace.
|
||||||
-config=<config> Sets the config (defaults to Debug)
|
-config=<config> Sets the config (defaults to Debug)
|
||||||
|
-generate Generates startup code for an empty project
|
||||||
-new Creates a new workspace and project
|
-new Creates a new workspace and project
|
||||||
-platform=<platform> Sets the platform (defaults to system platform)
|
-platform=<platform> Sets the platform (defaults to system platform)
|
||||||
-run Compile and run the startup project in the workspace
|
-run Compile and run the startup project in the workspace
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue