Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
BuildScript interactive mode demo
using FlubuCore.Context;
using FlubuCore.Scripting;
namespace FlubuCore
{
/// <summary>
/// Build script template.
/// </summary>
public class BuildScript : DefaultBuildScript
{
[FromArg("DeployEnviroment", "Enviroment where the application will be deployed.")]
public string DeployEnvironment { get; set; }
protected override void ConfigureBuildProperties(IBuildPropertiesContext context)
{
context.Properties.Set(BuildProps.ProductId, "Todo");
context.Properties.Set(BuildProps.ProductName, "Todo"); ;
context.Properties.Set(BuildProps.SolutionFileName, "..\\Todo.sln");
}
protected override void ConfigureTargets(ITaskContext session)
{
session.CreateTarget("run.tests")
.SetDescription("Run's all tests in solution")
.Do(Example, "Running run.tests target...");
session.CreateTarget("deploy")
.SetDescription("Deploys application to specified environment. ")
.Do(Example, "Running deploy target...");
}
public void Example(ITaskContext context, string msg)
{
context.LogInfo(msg);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.