diff --git a/.travis.yml b/.travis.yml index e319bee..1a12425 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,5 +12,5 @@ services: script: - export PATH="$PATH:$HOME/.dotnet/tools" - - dotnet tool install --global FlubuCore.GlobalTool --version 4.3.7 + - dotnet tool install --global FlubuCore.GlobalTool --version 5.1.1 - flubu build tests \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 4df4474..2e8fe7e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,7 @@ environment: services: - mysql before_build: - - ps: dotnet tool install --global FlubuCore.GlobalTool --version 4.3.7 + - ps: dotnet tool install --global FlubuCore.GlobalTool --version 5.1.1 build_script: - ps: flubu test: off diff --git a/build/BuildScript.cs b/build/BuildScript.cs index be7f0fa..54f897e 100644 --- a/build/BuildScript.cs +++ b/build/BuildScript.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using FlubuCore.Context; +using FlubuCore.Context.Attributes.BuildProperties; using FlubuCore.IO; using FlubuCore.Scripting; using FlubuCore.Scripting.Attributes; @@ -9,23 +10,20 @@ namespace BuildScript [Include("./build/BuildVersion.cs")] public partial class BuildScript : DefaultBuildScript { - protected string ArtifactsDir => RootDirectory.CombineWith("artifacts"); - [FromArg("c|configuration")] - public string Configuration { get; set; } + [BuildConfiguration] + public string Configuration { get; set; } = "Release"; + + [SolutionFileName] public string SolutionFileName { get; set; } = "CAP.sln"; protected BuildVersion BuildVersion { get; set; } + protected string ArtifactsDir => RootDirectory.CombineWith("artifacts"); + protected List ProjectFiles { get; set; } protected List TestProjectFiles { get; set; } - protected override void ConfigureBuildProperties(IBuildPropertiesContext context) - { - context.Properties.Set(BuildProps.SolutionFileName, "CAP.sln"); - context.Properties.Set(BuildProps.BuildConfiguration, string.IsNullOrEmpty(Configuration) ? "Release" : Configuration); - } - protected override void BeforeBuildExecution(ITaskContext context) { BuildVersion = FetchBuildVersion(context); diff --git a/build/BuildScript.csproj b/build/BuildScript.csproj index 44dc6cc..063bc46 100644 --- a/build/BuildScript.csproj +++ b/build/BuildScript.csproj @@ -9,7 +9,7 @@ - +