FlubuCore v2.8.2 Release Notes

    • FlubuCore is now available as .net core global tool. dotnet tool install --global FlubuCore.GlobalTool
    • ๐ŸŒ Flubu dotnet cli tool and web api is now available for .net core 2.1.
    • ๐Ÿ”ง Console arguments, configuration properties, enviroment variables can now be passed to script properties with FromArg attribute. Property doesn't need to have attribute. Argument key in that case is same as the property name.

      public class SimpleScript : DefaultBuildScript { [FromArg("-sn", "If true app is deployed on second node. Otherwise not.")] public bool deployOnSecondNode { get; set; }

      protected override void ConfigureBuildProperties(IBuildPropertiesContext context)
      {
      }
      
      protected override void ConfigureTargets(ITaskContext context)
      {
          context.CreateTarget("Deploy.Exapmle")
              .AddTask(x => x.FlubuWebApiTasks().GetTokenTask("user", "pass").SetWebApiBaseUrl("noade1Url"))
              .AddTask(x => x.FlubuWebApiTasks().UploadPackageTask("packageDir", "*.zip"))
              .AddTask(x => x.FlubuWebApiTasks().ExecuteScriptTask("Deploy", "DeployScript.cs"))
              .Group(target =>
                  {
                  target.AddTask(x => x.FlubuWebApiTasks().GetTokenTask("user", "pass").SetWebApiBaseUrl("noade2Url"))
                             .AddTask(x => x.FlubuWebApiTasks().UploadPackageTask("packageDir", "*.zip"))
                             .AddTask(x => x.FlubuWebApiTasks().ExecuteScriptTask("Deploy", "DeployScript.cs"));
                   },
                   when: c => deployOnSecondNode);
       }
      

      }

    You could then pass argument to property like so:

    ๐Ÿš€ Dotnet flubu Deploy.Example -sn=true

    • Target's can now be defined with attribute on method.

      [Target("targetName", "a", "b")]
      [Target("targetName2", "c", "d")]
      [Target("targetName3", "e", "f")]
      public void Example(ITargetFluentInterface target, string source, string destination)
      {
              target.AddTask(x => x.CopyFileTask(source, destination, true));
      }