Skip to content

Commit 7f090f4

Browse files
committed
Merge branch 'release/0.19.0'
2 parents fe74c79 + 5537f48 commit 7f090f4

File tree

66 files changed

+538
-478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+538
-478
lines changed

CHANGELOG.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [vNext]
88

9+
## [0.19.0] / 2019-05-03
10+
- Changed MSBuild targets to be invoked with `Exec` task
11+
- Changed `ProcessTasks` to avoid Mono when using WSL
12+
- Added output for non-default working directories
13+
- Added `GitVersion.VersionSourceSha`
14+
- Added `ReportTypes.TeamCitySummary`
15+
- Fixed parameter resolution to handle hyphens
16+
- Fixed MSBuild resolution for Visual Studio 2019
17+
- Fixed issues when build has no default target defined
18+
919
## [0.18.0] / 2019-03-24
1020
- Changed `ParameterService` to strip dashes when resolving value
1121
- Changed formatting of skip reason
@@ -146,15 +156,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
146156
- Fixed bootstrapping scripts to exit without closing PowerShell
147157
- Fixed expansion for Unix environment variables
148158
- Fixed separator for target parameters
149-
- Fixed `ToolPathResolver` to resolve decidedly
159+
- Fixed `ToolPathResolver` to resolve decidedly
150160
- Fixed `GitVersionTasks` to resolve based on `GitVersion.CommandLine.DotNetCore` package
151161
- Fixed `InjectionAttributeBase` to pass build instance
152162
- Fixed `ReflectionService` to be public to allow usage in addons
153163
- Fixed `DotNetTasks` to expose `restore` related parameters for `test`, `build`, `publish`, `pack`, `run`
154164

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

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

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

342-
[vNext]: https://github.com/nuke-build/common/compare/0.18.0...HEAD
352+
[vNext]: https://github.com/nuke-build/common/compare/0.19.0...HEAD
353+
[0.19.0]: https://github.com/nuke-build/common/compare/0.18.0...0.19.0
343354
[0.18.0]: https://github.com/nuke-build/common/compare/0.17.7...0.18.0
344355
[0.17.7]: https://github.com/nuke-build/common/compare/0.17.6...0.17.7
345356
[0.17.6]: https://github.com/nuke-build/common/compare/0.17.5...0.17.6

build/Build.GitFlow.cs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using Nuke.Common.Git;
99
using Nuke.Common.Tooling;
1010
using Nuke.Common.Tools.GitVersion;
11-
using Nuke.Common.Utilities;
1211
using static Nuke.Common.ChangeLog.ChangelogTasks;
1312
using static Nuke.Common.Tools.Git.GitTasks;
1413
using static Nuke.Common.Tools.GitVersion.GitVersionTasks;

build/Build.cs

+22-19
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Maintainers of NUKE.
1+
// Copyright 2019 Maintainers of NUKE.
22
// Distributed under the MIT License.
33
// https://github.com/nuke-build/nuke/blob/master/LICENSE
44

@@ -73,9 +73,8 @@ partial class Build : NukeBuild
7373
.SetProjectFile(Solution));
7474
});
7575

76-
[Unlisted] [ProjectFrom(nameof(Solution))] Project CommonProject;
7776
[Unlisted] [ProjectFrom(nameof(Solution))] Project GlobalToolProject;
78-
[Unlisted] [ProjectFrom(nameof(Solution))] Project CodeGenerationProject;
77+
[Unlisted] [ProjectFrom(nameof(Solution))] Project MSBuildTaskRunnerProject;
7978

8079
Target Compile => _ => _
8180
.DependsOn(Restore)
@@ -96,7 +95,7 @@ partial class Build : NukeBuild
9695
.SetFileVersion(GitVersion.GetNormalizedFileVersion())
9796
.SetInformationalVersion(GitVersion.InformationalVersion)
9897
.CombineWith(
99-
from project in new[] { GlobalToolProject, CommonProject, CodeGenerationProject }
98+
from project in new[] { GlobalToolProject, MSBuildTaskRunnerProject }
10099
from framework in project.GetTargetFrameworks()
101100
select new { project, framework }, (cs, v) => cs
102101
.SetProject(v.project)
@@ -180,22 +179,26 @@ from framework in project.GetTargetFrameworks()
180179
.SetTargetPath(v)),
181180
degreeOfParallelism: 5,
182181
completeOnFailure: true);
182+
});
183183

184-
if (GitRepository.Branch.EqualsOrdinalIgnoreCase(MasterBranch))
185-
{
186-
SendSlackMessage(m => m
187-
.SetText(new StringBuilder()
188-
.AppendLine($"<!here> :mega::shipit: *NUKE {GitVersion.SemVer} IS OUT!!!*")
189-
.AppendLine()
190-
.AppendLine(ChangelogSectionNotes.Select(x => x.Replace("- ", "• ")).JoinNewLine()).ToString()),
191-
SlackWebhook);
192-
193-
SendGitterMessage(new StringBuilder()
194-
.AppendLine($"@/all :mega::shipit: **NUKE {GitVersion.SemVer} IS OUT!!!**")
184+
Target Announce => _ => _
185+
.TriggeredBy(Publish)
186+
.AssuredAfterFailure()
187+
.OnlyWhenStatic(() => GitRepository.IsOnMasterBranch())
188+
.Executes(() =>
189+
{
190+
SendSlackMessage(m => m
191+
.SetText(new StringBuilder()
192+
.AppendLine($"<!here> :mega::shipit: *NUKE {GitVersion.SemVer} IS OUT!!!*")
195193
.AppendLine()
196-
.AppendLine(ChangelogSectionNotes.Select(x => x.Replace("- ", "* ")).JoinNewLine()).ToString(),
197-
"593f3dadd73408ce4f66db89",
198-
GitterAuthToken);
199-
}
194+
.AppendLine(ChangelogSectionNotes.Select(x => x.Replace("- ", "• ")).JoinNewLine()).ToString()),
195+
SlackWebhook);
196+
197+
SendGitterMessage(new StringBuilder()
198+
.AppendLine($"@/all :mega::shipit: **NUKE {GitVersion.SemVer} IS OUT!!!**")
199+
.AppendLine()
200+
.AppendLine(ChangelogSectionNotes.Select(x => x.Replace("- ", "* ")).JoinNewLine()).ToString(),
201+
"593f3dadd73408ce4f66db89",
202+
GitterAuthToken);
200203
});
201204
}

build/specifications/GitVersion.json

+4
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@
260260
"name": "NuGetPreReleaseTag",
261261
"type": "string"
262262
},
263+
{
264+
"name": "VersionSourceSha",
265+
"type": "string"
266+
},
263267
{
264268
"name": "CommitsSinceVersionSource",
265269
"type": "string"

build/specifications/ReportGenerator.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@
102102
"TextSummary",
103103
"Xml",
104104
"XmlSummary",
105-
"SonarQube"
105+
"SonarQube",
106+
"TeamCitySummary"
106107
]
107108
},
108109
{

nuke-common.sln

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuke.GlobalTool", "source\N
3333
EndProject
3434
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuke.GlobalTool.Tests", "source\Nuke.GlobalTool.Tests\Nuke.GlobalTool.Tests.csproj", "{BD416DD4-06F4-4246-B92C-B261B026B6E9}"
3535
EndProject
36+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nuke.MSBuildTaskRunner", "source\Nuke.MSBuildTaskRunner\Nuke.MSBuildTaskRunner.csproj", "{8166FF13-87CF-45BC-B307-7A16329B6981}"
37+
EndProject
3638
Global
3739
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3840
Debug|Any CPU = Debug|Any CPU
@@ -65,6 +67,10 @@ Global
6567
{BD416DD4-06F4-4246-B92C-B261B026B6E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
6668
{BD416DD4-06F4-4246-B92C-B261B026B6E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
6769
{BD416DD4-06F4-4246-B92C-B261B026B6E9}.Release|Any CPU.Build.0 = Release|Any CPU
70+
{8166FF13-87CF-45BC-B307-7A16329B6981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
71+
{8166FF13-87CF-45BC-B307-7A16329B6981}.Debug|Any CPU.Build.0 = Debug|Any CPU
72+
{8166FF13-87CF-45BC-B307-7A16329B6981}.Release|Any CPU.ActiveCfg = Release|Any CPU
73+
{8166FF13-87CF-45BC-B307-7A16329B6981}.Release|Any CPU.Build.0 = Release|Any CPU
6874
EndGlobalSection
6975
GlobalSection(SolutionProperties) = preSolution
7076
HideSolutionNode = FALSE

shell-completion.yml

+3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ Host:
1414
- TeamCity
1515
- TeamServices
1616
- Travis
17+
NoLogo:
1718
Plan:
1819
Root:
1920
Skip:
2021
- Analysis
22+
- Announce
2123
- Changelog
2224
- Clean
2325
- Compile
@@ -36,6 +38,7 @@ Source:
3638
SymbolSource:
3739
Target:
3840
- Analysis
41+
- Announce
3942
- Changelog
4043
- Clean
4144
- Compile

source/Nuke.CodeGeneration/CodeGenerator.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ public static void GenerateCode(
5151
tool.Namespace = namespaceProvider?.Invoke(tool);
5252
ApplyRuntimeInformation(tool, specificationFile, sourceFileProvider, namespaceProvider);
5353

54-
var outputFile = outputFileProvider?.Invoke(tool) ??
55-
Path.Combine(Path.GetDirectoryName(tool.SpecificationFile).NotNull(), tool.DefaultOutputFileName);
56-
57-
GenerateCode(tool, outputFile);
54+
GenerateCode(tool, outputFileProvider?.Invoke(tool) ?? tool.DefaultOutputFile);
5855
}
5956
}
6057

source/Nuke.CodeGeneration/CodeGeneratorTask.cs

-62
This file was deleted.

source/Nuke.CodeGeneration/Generators/ModelExtensions.cs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System;
66
using System.Linq;
77
using System.Text.RegularExpressions;
8-
using JetBrains.Annotations;
98
using Nuke.CodeGeneration.Model;
109
using Nuke.Common;
1110
using Nuke.Common.Utilities;

source/Nuke.CodeGeneration/Generators/StringExtensions.cs

-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
using System.Globalization;
88
using System.Linq;
99
using Humanizer;
10-
using JetBrains.Annotations;
1110
using Nuke.Common;
12-
using Nuke.Common.Utilities;
1311

1412
namespace Nuke.CodeGeneration.Generators
1513
{

source/Nuke.CodeGeneration/Model/Property.cs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using System.Linq;
1010
using JetBrains.Annotations;
1111
using Newtonsoft.Json;
12-
using Newtonsoft.Json.Converters;
1312

1413
namespace Nuke.CodeGeneration.Model
1514
{
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
2+
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
55
</PropertyGroup>
6-
6+
77
<ItemGroup>
88
<PackageReference Include="HtmlAgilityPack" Version="1.6.3" />
99
<PackageReference Include="Humanizer" Version="2.2.0" />
1010
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
1111
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.5" />
1212
<PackageReference Include="System.ComponentModel.Annotations" Version="4.4.1" />
1313
</ItemGroup>
14-
14+
1515
<ItemGroup>
1616
<ProjectReference Include="..\Nuke.Common\Nuke.Common.csproj" />
1717
</ItemGroup>
1818

19-
<ItemGroup Condition="'$(TargetFramework)' == ''">
20-
<None Include="$(MSBuildProjectName).targets" PackagePath="build\netstandard2.0" Pack="true" />
21-
<None Include="$(MSBuildProjectName).targets" PackagePath="build\net461" Pack="true" />
22-
<None Include="bin\$(Configuration)\netstandard2.0\publish\**\*.*" PackagePath="build\netstandard2.0" Pack="true" />
23-
<None Include="bin\$(Configuration)\net461\publish\**\*.*" PackagePath="build\net461" Pack="true" />
24-
</ItemGroup>
25-
2619
<ItemGroup>
2720
<Nuke Include="..\..\build\Build.CodeGeneration.cs" />
2821
</ItemGroup>
29-
22+
3023
</Project>

source/Nuke.Common.Tests/ExternalFilesTaskTest.cs

-22
This file was deleted.

source/Nuke.Common.Tests/ParameterServiceTest.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public void TestConversion(string argument, Type destinationType, object expecte
5252
[Theory]
5353
[InlineData("MSBuildConfiguration", typeof(string), "msbcfg")]
5454
[InlineData("dockerConfiguration", typeof(string), "dkrcfg")]
55+
[InlineData("publish-dir", typeof(string), "dir")]
5556
public void TestSplitted(string argument, Type destinationType, object expectedValue)
5657
{
5758
GetService(
@@ -60,7 +61,9 @@ public void TestSplitted(string argument, Type destinationType, object expectedV
6061
"-msbuild-configuration",
6162
"msbcfg",
6263
"-docker-configuration",
63-
"dkrcfg"
64+
"dkrcfg",
65+
"--publish-dir",
66+
"dir"
6467
}).GetCommandLineArgument(argument, destinationType).Should().Be(expectedValue);
6568
}
6669

source/Nuke.Common.Tests/ProjectModelTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void SolutionTest()
2424
var solution = ProjectModelTasks.ParseSolution(SolutionFile);
2525

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

2929
var buildProject = solution.AllProjects.SingleOrDefault(x => x.Name == "_build");
3030
buildProject.Should().NotBeNull();

0 commit comments

Comments
 (0)