Skip to content

Commit

Permalink
Merge branch 'hotfix/5.0.1' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Dec 6, 2020
2 parents 119bbfd + eb24100 commit ed5be8e
Show file tree
Hide file tree
Showing 45 changed files with 1,839 additions and 418 deletions.
8 changes: 4 additions & 4 deletions .teamcity/settings.kts
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ project {
allowEmpty = true,
display = ParameterDisplay.NORMAL)
text (
"env.SignPathProjectKey",
label = "SignPathProjectKey",
"env.SignPathProjectSlug",
label = "SignPathProjectSlug",
value = "",
allowEmpty = true,
display = ParameterDisplay.NORMAL)
text (
"env.SignPathPolicyKey",
label = "SignPathPolicyKey",
"env.SignPathPolicySlug",
label = "SignPathPolicySlug",
value = "",
allowEmpty = true,
display = ParameterDisplay.NORMAL)
Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [vNext]

## [5.0.1] / 2020-12-06
- Fixed configuration generation to wait for user input after file changes
- Fixed build summary for durations smaller than 1 second
- Fixed build summary and `IBuildExtension` instances to be skipped if no targets were started
- Fixed build summary to hide irrelevant durations
- Fixed setting of `EmbeddedPackagesDirectory` for global tools
- Fixed `PackPackageToolsTask` to use lower-case package ids
- Fixed `ParameterAttribute.ValueProvider` to allow members of type `IEnumerable<string>`
- Fixed `Logger` to remove `ControlFlow` from stacktrace
- Fixed assertion messages for warnings
- Fixed path and quoting in `build.cmd`
- Fixed `GitVersion.Tool` version in project templates
- Fixed `LatestMyGetVersionAttribute` to handle new RSS feed format
- Fixed missing arguments `PublishReadyToRun`, `PublishSingleFile`, `PublishTrimmed`, `PublishProfile`, `NoLogo` for `DotNetPublish`
- Fixed parameter name `Verbosity` in `DotNetPack`
- Fixed enumeration value `lcov` in `CoverletTasks`
- Fixed `ReSharperTasks` to use correct tool path
- Fixed `ChangelogTasks` to respect additional markdown-linting rules
- Fixed TeamCity generator to consider artifact products from all relevant targets
- Fixed condition for skipping lines in TeamCity parameter files

## [5.0.0] / 2020-11-12
- Fixed version number

Expand Down Expand Up @@ -639,7 +660,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]: git@github.com:nuke-build/nuke/compare/5.0.0...HEAD
[vNext]: git@github.com:nuke-build/nuke/compare/5.0.1...HEAD
[5.0.1]: git@github.com:nuke-build/nuke/compare/5.0.0...5.0.1
[5.0.0]: git@github.com:nuke-build/nuke/compare/0.25.0...5.0.0
[0.25.0]: git@github.com:nuke-build/nuke/compare/0.24.11...0.25.0
[0.24.11]: git@github.com:nuke-build/nuke/compare/0.24.10...0.24.11
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ artifacts:

environment:
SignPathApiToken:
secure: 8qQa3PGEnzXnm1sqqcHZyonFZ/ONlg6nsnFjbkhADU9fJyhSV+0daA/mqWhO9yAb
secure: zYFzA/7H1MDXDlpX6SAyv41kiBmu8Vh3kvWC7tPfk7eVdhh9mGQgXC7AzgcGnpsg
SignPathOrganizationId: 0fdaf334-6910-41f4-83d2-e58e4cccb087
SignPathProjectKey: nuke
SignPathPolicyKey: test-signing
SignPathProjectSlug: nuke
SignPathPolicySlug: release-signing
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
:; exit $?

@ECHO OFF
powershell -ExecutionPolicy ByPass -NoProfile %0\..\build.ps1 %*
powershell -ExecutionPolicy ByPass -NoProfile "%~dp0build.ps1" %*
5 changes: 5 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ function ExecSafe([scriptblock] $cmd) {
# Print environment variables
Get-Item -Path Env:* | Sort-Object -Property Name | ForEach-Object {"{0}={1}" -f $_.Name,$_.Value}

# Check if any dotnet is installed
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue)) {
ExecSafe { & dotnet --info }
}

# If dotnet CLI is installed globally and it matches requested version, use for execution
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
$(dotnet --version) -and $LASTEXITCODE -eq 0) {
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ function FirstJsonValue {
# Print environment variables
env | sort

# Check if any dotnet is installed
if [[ -x "$(command -v dotnet)" ]]; then
dotnet --info
fi

# If dotnet CLI is installed globally and it matches requested version, use for execution
if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then
export DOTNET_EXE="$(command -v dotnet)"
Expand Down
15 changes: 8 additions & 7 deletions build/Build.GitFlow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
partial class Build
{
[Parameter] readonly bool AutoStash = true;
string MajorMinorPatchVersion => GitVersion.MajorMinorPatch;

Target Milestone => _ => _
.Unlisted()
.OnlyWhenStatic(() => GitRepository.IsOnReleaseBranch() || GitRepository.IsOnHotfixBranch())
.Executes(async () =>
{
var milestoneTitle = $"v{GitVersion.MajorMinorPatch}";
var milestoneTitle = $"v{MajorMinorPatchVersion}";
var milestone = (await GitRepository.GetGitHubMilestone(milestoneTitle)).NotNull("milestone != null");
Assert(milestone.OpenIssues == 0, "milestone.OpenIssues == 0");
Assert(milestone.ClosedIssues != 0, "milestone.ClosedIssues != 0");
Expand All @@ -38,12 +39,12 @@ partial class Build
.OnlyWhenStatic(() => GitRepository.IsOnReleaseBranch() || GitRepository.IsOnHotfixBranch())
.Executes(() =>
{
FinalizeChangelog(ChangelogFile, GitVersion.MajorMinorPatch, GitRepository);
FinalizeChangelog(ChangelogFile, MajorMinorPatchVersion, GitRepository);
Logger.Info("Please review CHANGELOG.md and press any key to continue...");
System.Console.ReadKey();

Git($"add {ChangelogFile}");
Git($"commit -m \"Finalize {Path.GetFileName(ChangelogFile)} for {GitVersion.MajorMinorPatch}\"");
Git($"commit -m \"Finalize {Path.GetFileName(ChangelogFile)} for {MajorMinorPatchVersion}\"");
});

[UsedImplicitly]
Expand All @@ -53,7 +54,7 @@ partial class Build
.Executes(() =>
{
if (!GitRepository.IsOnReleaseBranch())
Checkout($"{ReleaseBranchPrefix}/{GitVersion.MajorMinorPatch}", start: DevelopBranch);
Checkout($"{ReleaseBranchPrefix}/{MajorMinorPatchVersion}", start: DevelopBranch);
else
FinishReleaseOrHotfix();
});
Expand All @@ -65,7 +66,7 @@ partial class Build
.Executes(() =>
{
var masterVersion = GitVersion(s => s
.SetFramework("netcoreapp3.0")
.SetFramework("netcoreapp3.1")
.SetUrl(RootDirectory)
.SetBranch(MasterBranch)
.EnableNoFetch()
Expand All @@ -81,14 +82,14 @@ void FinishReleaseOrHotfix()
{
Git($"checkout {MasterBranch}");
Git($"merge --no-ff --no-edit {GitRepository.Branch}");
Git($"tag {GitVersion.MajorMinorPatch}");
Git($"tag {MajorMinorPatchVersion}");

Git($"checkout {DevelopBranch}");
Git($"merge --no-ff --no-edit {GitRepository.Branch}");

Git($"branch -D {GitRepository.Branch}");

Git($"push origin {MasterBranch} {DevelopBranch} {GitVersion.MajorMinorPatch}");
Git($"push origin {MasterBranch} {DevelopBranch} {MajorMinorPatchVersion}");
}

void Checkout(string branch, string start)
Expand Down
2 changes: 1 addition & 1 deletion build/Build.ReleaseImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ partial class Build
location: new PointF(image.Width / 2f, image.Height / 2f - 100),
options: graphicsOptions)
.DrawText(
text: "0.24.0",
text: MajorMinorPatchVersion,
font: robotoFont.CreateFont(150),
color: Color.WhiteSmoke,
location: new PointF(image.Width / 2f, image.Height / 2f),
Expand Down
5 changes: 3 additions & 2 deletions build/Build.SignPackages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
using System.IO;
using System.Linq;
using Nuke.Common;
using Nuke.Common.Git;
using Nuke.Common.IO;
using Nuke.Common.Utilities;
using Nuke.Components;

partial class Build : ISignPackages
{
// https://ci.appveyor.com/tools/encrypt

public IEnumerable<AbsolutePath> SignPathPackages => PackageFiles
.Where(x => Path.GetFileName(x).StartsWithAny(
"Nuke.Common",
Expand All @@ -24,5 +23,7 @@ partial class Build : ISignPackages

public Target SignPackages => _ => _
.Inherit<ISignPackages>(x => x.SignPackages)
.OnlyWhenStatic(() => GitRepository.IsOnMasterBranch())
.OnlyWhenStatic(() => EnvironmentInfo.IsWin)
.TriggeredBy(Pack);
}
2 changes: 1 addition & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta0008" />
<PackageReference Include="tweetinviapi" Version="5.0.0-alpha-6" />
<PackageDownload Include="GitVersion.Tool" Version="[5.3.7]" />
<PackageDownload Include="GitVersion.Tool" Version="[5.5.1]" />
<PackageDownload Include="JetBrains.dotCover.CommandLineTools" Version="[2020.1.3]" />
<PackageDownload Include="JetBrains.ReSharper.GlobalTools" Version="[2020.2.0-eap05]" />
<PackageDownload Include="OpenCover" Version="[4.7.922]" />
Expand Down
2 changes: 1 addition & 1 deletion build/specifications/Coverlet.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"name": "CoverletOutputFormat",
"values": [
"json",
"Icov",
"lcov",
"opencover",
"cobertura",
"teamcity"
Expand Down
27 changes: 26 additions & 1 deletion build/specifications/DotNet.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
"help": "Sets the serviceable flag in the package. For more information, see <a href=\"https://aka.ms/nupkgservicing\">.NET Blog: .NET 4.5.1 Supports Microsoft Security Updates for .NET NuGet Libraries</a>."
},
{
"name": "Verbostiy",
"name": "Verbosity",
"type": "DotNetVerbosity",
"format": "--verbosity {value}",
"help": "Sets the verbosity level of the command. Allowed values are <c>q[uiet]</c>, <c>m[inimal]</c>, <c>n[ormal]</c>, <c>d[etailed]</c>, and <c>diag[nostic]</c>."
Expand Down Expand Up @@ -520,6 +520,12 @@
"type": "string",
"format": "--version-suffix {value}",
"help": "Defines the version suffix for an asterisk (<c>*</c>) in the version field of the project file. The format follows NuGet's version guidelines."
},
{
"name": "NoLogo",
"type": "bool",
"format": "--nologo",
"help": "Doesn't display the startup banner or the copyright message. Available since .NET Core 3.0 SDK."
}
]
}
Expand Down Expand Up @@ -910,6 +916,25 @@
"name": "SymbolPackageFormat",
"type": "DotNetSymbolPackageFormat",
"help": "Format for packaging symbols."
},
{
"name": "PublishReadyToRun",
"type": "bool",
"help": "Compiles application assemblies as ReadyToRun (R2R) format. R2R is a form of ahead-of-time (AOT) compilation. For more information, see <a href=\"https://docs.microsoft.com/en-us/dotnet/core/deploying/ready-to-run\">ReadyToRun images</a>. Available since .NET Core 3.0 SDK.<para/>We recommend that you specify this option in a publish profile rather than on the command line. For more information, see <a href=\"https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish#msbuild\">MSBuild</a>."
},
{
"name": "PublishSingleFile",
"type": "bool",
"help": "Packages the app into a platform-specific single-file executable. The executable is self-extracting and contains all dependencies (including native) that are required to run the app. When the app is first run, the application is extracted to a directory based on the app name and build identifier. Startup is faster when the application is run again. The application doesn't need to extract itself a second time unless a new version is used. Available since .NET Core 3.0 SDK.<para/> For more information about single-file publishing, see the <a href=\"https://github.com/dotnet/designs/blob/master/accepted/2020/single-file/design.md\">single-file bundler design document</a>.<para/>We recommend that you specify this option in a publish profile rather than on the command line. For more information, see <a href=\"https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish#msbuild\">MSBuild</a>."
},
{
"name": "PublishTrimmed",
"type": "bool",
"help": "Trims unused libraries to reduce the deployment size of an app when publishing a self-contained executable. For more information, see <a href=\"https://docs.microsoft.com/en-us/dotnet/core/deploying/trim-self-contained\">Trim self-contained deployments and executables</a>. Available since .NET Core 3.0 SDK as a preview feature.<para/>We recommend that you specify this option in a publish profile rather than on the command line. For more information, see <a href=\"https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish#msbuild\">MSBuild</a>."
},
{
"name": "PublishProfile",
"type": "string"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion build/specifications/ReSharper.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "ReSharper",
"officialUrl": "https://www.jetbrains.com/help/resharper/ReSharper_Command_Line_Tools.html",
"packageId": "JetBrains.ReSharper.GlobalTools",
"packageExecutable": "JetBrains.CommandLine.Products.exe",
"packageExecutable": "JetBrains.CommandLine.Products.dll",
"tasks": [
{
"help": "One of ReSharper's most notable features, code inspection, is available even without opening Visual Studio. InspectCode, a free command line tool requires a minimum of one parameter- your solution file- to apply all of ReSharper's inspections.",
Expand Down
4 changes: 2 additions & 2 deletions shell-completion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Plan:
Root:
SignPathApiToken:
SignPathOrganizationId:
SignPathPolicyKey:
SignPathProjectKey:
SignPathPolicySlug:
SignPathProjectSlug:
Skip:
- Analysis
- Announce
Expand Down
2 changes: 1 addition & 1 deletion source/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
</ItemGroup>

<ItemGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
<PackageReference Include="approvaltests" Version="5.1.0" />
<PackageReference Include="coverlet.msbuild" Version="2.7.0" />
<PackageReference Include="FluentAssertions" Version="5.9.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0"/>
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.15"/>
<PackageReference Include="Verify.Xunit" Version="8.4.2" />
<PackageReference Include="xunit" Version="2.4.1"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
- uses: actions/checkout@v1
- name: Run './build.cmd Test'
run: ./build.cmd Test
- uses: actions/upload-artifact@v1
with:
name: src
path: src
- uses: actions/upload-artifact@v1
with:
name: test-results
Expand All @@ -59,6 +63,10 @@ jobs:
- uses: actions/checkout@v1
- name: Run './build.cmd Test'
run: ./build.cmd Test
- uses: actions/upload-artifact@v1
with:
name: src
path: src
- uses: actions/upload-artifact@v1
with:
name: test-results
Expand All @@ -74,6 +82,10 @@ jobs:
- uses: actions/checkout@v1
- name: Run './build.cmd Test'
run: ./build.cmd Test
- uses: actions/upload-artifact@v1
with:
name: src
path: src
- uses: actions/upload-artifact@v1
with:
name: test-results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ skip_tags: true
skip_branch_with_pr: true

build_script:
- ps: .\build.ps1 Test
- cmd: .\build.cmd Test
- sh: ./build.cmd Test

artifacts:
- path: src/*/obj/**
- path: src/*/bin/**
- path: output/test-results/*.trx
- path: output/test-results/*.xml
- path: output/coverage-report.zip
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ trigger:
- excluded_path

stages:
- stage: ubuntu_18.04
- stage: ubuntu_18_04
displayName: 'ubuntu-18.04'
dependsOn: [ ]
pool:
Expand All @@ -52,6 +52,10 @@ stages:
env:
AzurePipelinesSystemAccessToken: $(System.AccessToken)
GitHubToken: $(GitHubToken)
- task: PublishBuildArtifacts@1
inputs:
artifactName: src
pathtoPublish: 'src'
- job: Compile
displayName: 'Compile'
dependsOn: [ Restore ]
Expand All @@ -62,6 +66,10 @@ stages:
env:
AzurePipelinesSystemAccessToken: $(System.AccessToken)
GitHubToken: $(GitHubToken)
- task: PublishBuildArtifacts@1
inputs:
artifactName: src
pathtoPublish: 'src'
- job: Test
displayName: 'Test'
dependsOn: [ Compile ]
Expand Down Expand Up @@ -108,6 +116,10 @@ stages:
env:
AzurePipelinesSystemAccessToken: $(System.AccessToken)
GitHubToken: $(GitHubToken)
- task: PublishBuildArtifacts@1
inputs:
artifactName: src
pathtoPublish: 'src'
- job: Compile
displayName: 'Compile'
dependsOn: [ Restore ]
Expand All @@ -118,6 +130,10 @@ stages:
env:
AzurePipelinesSystemAccessToken: $(System.AccessToken)
GitHubToken: $(GitHubToken)
- task: PublishBuildArtifacts@1
inputs:
artifactName: src
pathtoPublish: 'src'
- job: Test
displayName: 'Test'
dependsOn: [ Compile ]
Expand Down
Loading

0 comments on commit ed5be8e

Please sign in to comment.