Skip to content

Commit

Permalink
Merge branch 'release/0.19.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed May 3, 2019
2 parents fe74c79 + 5537f48 commit 7f090f4
Show file tree
Hide file tree
Showing 66 changed files with 538 additions and 478 deletions.
19 changes: 15 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [vNext]

## [0.19.0] / 2019-05-03
- Changed MSBuild targets to be invoked with `Exec` task
- Changed `ProcessTasks` to avoid Mono when using WSL
- Added output for non-default working directories
- Added `GitVersion.VersionSourceSha`
- Added `ReportTypes.TeamCitySummary`
- Fixed parameter resolution to handle hyphens
- Fixed MSBuild resolution for Visual Studio 2019
- Fixed issues when build has no default target defined

## [0.18.0] / 2019-03-24
- Changed `ParameterService` to strip dashes when resolving value
- Changed formatting of skip reason
Expand Down Expand Up @@ -146,15 +156,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed bootstrapping scripts to exit without closing PowerShell
- Fixed expansion for Unix environment variables
- Fixed separator for target parameters
- Fixed `ToolPathResolver` to resolve decidedly
- Fixed `ToolPathResolver` to resolve decidedly
- Fixed `GitVersionTasks` to resolve based on `GitVersion.CommandLine.DotNetCore` package
- Fixed `InjectionAttributeBase` to pass build instance
- Fixed `ReflectionService` to be public to allow usage in addons
- Fixed `DotNetTasks` to expose `restore` related parameters for `test`, `build`, `publish`, `pack`, `run`

## [0.12.0] / 2018-11-15
- Changed `NukeBuild` properties to be static
- Changed `NukeBuild.RootDirectory` to allow resolution from parameter
- Changed `NukeBuild.RootDirectory` to allow resolution from parameter
- Added package resolution for Paket
- Added shell-completion for global tool
- Added parameter resolution for `Enumeration` subclasses
Expand Down Expand Up @@ -237,7 +247,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [0.6.1] / 2018-08-09
- Fixed global tool to have 'same as global tool' as fallback version
- Fixed PowerShell invocation to use `-ExecutionPolicy ByPass` and `-NoProfile`
- Fixed PowerShell invocation to use `-ExecutionPolicy ByPass` and `-NoProfile`

## [0.6.0] / 2018-08-05
- Removed setup scripts in favor of `:setup` command in global tool
Expand Down Expand Up @@ -339,7 +349,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added CLT tasks for Git
- Fixed background color in console output

[vNext]: https://github.com/nuke-build/common/compare/0.18.0...HEAD
[vNext]: https://github.com/nuke-build/common/compare/0.19.0...HEAD
[0.19.0]: https://github.com/nuke-build/common/compare/0.18.0...0.19.0
[0.18.0]: https://github.com/nuke-build/common/compare/0.17.7...0.18.0
[0.17.7]: https://github.com/nuke-build/common/compare/0.17.6...0.17.7
[0.17.6]: https://github.com/nuke-build/common/compare/0.17.5...0.17.6
Expand Down
1 change: 0 additions & 1 deletion build/Build.GitFlow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Nuke.Common.Git;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.GitVersion;
using Nuke.Common.Utilities;
using static Nuke.Common.ChangeLog.ChangelogTasks;
using static Nuke.Common.Tools.Git.GitTasks;
using static Nuke.Common.Tools.GitVersion.GitVersionTasks;
Expand Down
41 changes: 22 additions & 19 deletions build/Build.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Maintainers of NUKE.
// Copyright 2019 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE

Expand Down Expand Up @@ -73,9 +73,8 @@ partial class Build : NukeBuild
.SetProjectFile(Solution));
});

[Unlisted] [ProjectFrom(nameof(Solution))] Project CommonProject;
[Unlisted] [ProjectFrom(nameof(Solution))] Project GlobalToolProject;
[Unlisted] [ProjectFrom(nameof(Solution))] Project CodeGenerationProject;
[Unlisted] [ProjectFrom(nameof(Solution))] Project MSBuildTaskRunnerProject;

Target Compile => _ => _
.DependsOn(Restore)
Expand All @@ -96,7 +95,7 @@ partial class Build : NukeBuild
.SetFileVersion(GitVersion.GetNormalizedFileVersion())
.SetInformationalVersion(GitVersion.InformationalVersion)
.CombineWith(
from project in new[] { GlobalToolProject, CommonProject, CodeGenerationProject }
from project in new[] { GlobalToolProject, MSBuildTaskRunnerProject }
from framework in project.GetTargetFrameworks()
select new { project, framework }, (cs, v) => cs
.SetProject(v.project)
Expand Down Expand Up @@ -180,22 +179,26 @@ from framework in project.GetTargetFrameworks()
.SetTargetPath(v)),
degreeOfParallelism: 5,
completeOnFailure: true);
});

if (GitRepository.Branch.EqualsOrdinalIgnoreCase(MasterBranch))
{
SendSlackMessage(m => m
.SetText(new StringBuilder()
.AppendLine($"<!here> :mega::shipit: *NUKE {GitVersion.SemVer} IS OUT!!!*")
.AppendLine()
.AppendLine(ChangelogSectionNotes.Select(x => x.Replace("- ", "• ")).JoinNewLine()).ToString()),
SlackWebhook);

SendGitterMessage(new StringBuilder()
.AppendLine($"@/all :mega::shipit: **NUKE {GitVersion.SemVer} IS OUT!!!**")
Target Announce => _ => _
.TriggeredBy(Publish)
.AssuredAfterFailure()
.OnlyWhenStatic(() => GitRepository.IsOnMasterBranch())
.Executes(() =>
{
SendSlackMessage(m => m
.SetText(new StringBuilder()
.AppendLine($"<!here> :mega::shipit: *NUKE {GitVersion.SemVer} IS OUT!!!*")
.AppendLine()
.AppendLine(ChangelogSectionNotes.Select(x => x.Replace("- ", "* ")).JoinNewLine()).ToString(),
"593f3dadd73408ce4f66db89",
GitterAuthToken);
}
.AppendLine(ChangelogSectionNotes.Select(x => x.Replace("- ", "• ")).JoinNewLine()).ToString()),
SlackWebhook);

SendGitterMessage(new StringBuilder()
.AppendLine($"@/all :mega::shipit: **NUKE {GitVersion.SemVer} IS OUT!!!**")
.AppendLine()
.AppendLine(ChangelogSectionNotes.Select(x => x.Replace("- ", "* ")).JoinNewLine()).ToString(),
"593f3dadd73408ce4f66db89",
GitterAuthToken);
});
}
4 changes: 4 additions & 0 deletions build/specifications/GitVersion.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@
"name": "NuGetPreReleaseTag",
"type": "string"
},
{
"name": "VersionSourceSha",
"type": "string"
},
{
"name": "CommitsSinceVersionSource",
"type": "string"
Expand Down
3 changes: 2 additions & 1 deletion build/specifications/ReportGenerator.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
"TextSummary",
"Xml",
"XmlSummary",
"SonarQube"
"SonarQube",
"TeamCitySummary"
]
},
{
Expand Down
6 changes: 6 additions & 0 deletions nuke-common.sln
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuke.GlobalTool", "source\N
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuke.GlobalTool.Tests", "source\Nuke.GlobalTool.Tests\Nuke.GlobalTool.Tests.csproj", "{BD416DD4-06F4-4246-B92C-B261B026B6E9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuke.MSBuildTaskRunner", "source\Nuke.MSBuildTaskRunner\Nuke.MSBuildTaskRunner.csproj", "{8166FF13-87CF-45BC-B307-7A16329B6981}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -65,6 +67,10 @@ Global
{BD416DD4-06F4-4246-B92C-B261B026B6E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD416DD4-06F4-4246-B92C-B261B026B6E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD416DD4-06F4-4246-B92C-B261B026B6E9}.Release|Any CPU.Build.0 = Release|Any CPU
{8166FF13-87CF-45BC-B307-7A16329B6981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8166FF13-87CF-45BC-B307-7A16329B6981}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8166FF13-87CF-45BC-B307-7A16329B6981}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8166FF13-87CF-45BC-B307-7A16329B6981}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
3 changes: 3 additions & 0 deletions shell-completion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ Host:
- TeamCity
- TeamServices
- Travis
NoLogo:
Plan:
Root:
Skip:
- Analysis
- Announce
- Changelog
- Clean
- Compile
Expand All @@ -36,6 +38,7 @@ Source:
SymbolSource:
Target:
- Analysis
- Announce
- Changelog
- Clean
- Compile
Expand Down
5 changes: 1 addition & 4 deletions source/Nuke.CodeGeneration/CodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ public static void GenerateCode(
tool.Namespace = namespaceProvider?.Invoke(tool);
ApplyRuntimeInformation(tool, specificationFile, sourceFileProvider, namespaceProvider);

var outputFile = outputFileProvider?.Invoke(tool) ??
Path.Combine(Path.GetDirectoryName(tool.SpecificationFile).NotNull(), tool.DefaultOutputFileName);

GenerateCode(tool, outputFile);
GenerateCode(tool, outputFileProvider?.Invoke(tool) ?? tool.DefaultOutputFile);
}
}

Expand Down
62 changes: 0 additions & 62 deletions source/Nuke.CodeGeneration/CodeGeneratorTask.cs

This file was deleted.

1 change: 0 additions & 1 deletion source/Nuke.CodeGeneration/Generators/ModelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System;
using System.Linq;
using System.Text.RegularExpressions;
using JetBrains.Annotations;
using Nuke.CodeGeneration.Model;
using Nuke.Common;
using Nuke.Common.Utilities;
Expand Down
2 changes: 0 additions & 2 deletions source/Nuke.CodeGeneration/Generators/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
using System.Globalization;
using System.Linq;
using Humanizer;
using JetBrains.Annotations;
using Nuke.Common;
using Nuke.Common.Utilities;

namespace Nuke.CodeGeneration.Generators
{
Expand Down
1 change: 0 additions & 1 deletion source/Nuke.CodeGeneration/Model/Property.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using System.Linq;
using JetBrains.Annotations;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace Nuke.CodeGeneration.Model
{
Expand Down
15 changes: 4 additions & 11 deletions source/Nuke.CodeGeneration/Nuke.CodeGeneration.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.6.3" />
<PackageReference Include="Humanizer" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.5" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.4.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Nuke.Common\Nuke.Common.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == ''">
<None Include="$(MSBuildProjectName).targets" PackagePath="build\netstandard2.0" Pack="true" />
<None Include="$(MSBuildProjectName).targets" PackagePath="build\net461" Pack="true" />
<None Include="bin\$(Configuration)\netstandard2.0\publish\**\*.*" PackagePath="build\netstandard2.0" Pack="true" />
<None Include="bin\$(Configuration)\net461\publish\**\*.*" PackagePath="build\net461" Pack="true" />
</ItemGroup>

<ItemGroup>
<Nuke Include="..\..\build\Build.CodeGeneration.cs" />
</ItemGroup>

</Project>
22 changes: 0 additions & 22 deletions source/Nuke.Common.Tests/ExternalFilesTaskTest.cs

This file was deleted.

5 changes: 4 additions & 1 deletion source/Nuke.Common.Tests/ParameterServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public void TestConversion(string argument, Type destinationType, object expecte
[Theory]
[InlineData("MSBuildConfiguration", typeof(string), "msbcfg")]
[InlineData("dockerConfiguration", typeof(string), "dkrcfg")]
[InlineData("publish-dir", typeof(string), "dir")]
public void TestSplitted(string argument, Type destinationType, object expectedValue)
{
GetService(
Expand All @@ -60,7 +61,9 @@ public void TestSplitted(string argument, Type destinationType, object expectedV
"-msbuild-configuration",
"msbcfg",
"-docker-configuration",
"dkrcfg"
"dkrcfg",
"--publish-dir",
"dir"
}).GetCommandLineArgument(argument, destinationType).Should().Be(expectedValue);
}

Expand Down
2 changes: 1 addition & 1 deletion source/Nuke.Common.Tests/ProjectModelTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void SolutionTest()
var solution = ProjectModelTasks.ParseSolution(SolutionFile);

solution.SolutionFolders.Select(x => x.Name).Should().BeEquivalentTo("misc");
solution.AllProjects.Where(x => x.Is(ProjectType.CSharpProject)).Should().HaveCount(7);
solution.AllProjects.Where(x => x.Is(ProjectType.CSharpProject)).Should().HaveCount(8);

var buildProject = solution.AllProjects.SingleOrDefault(x => x.Name == "_build");
buildProject.Should().NotBeNull();
Expand Down
Loading

0 comments on commit 7f090f4

Please sign in to comment.