Skip to content

Commit df7b64e

Browse files
Bump Rocket.Surgery.Nuke from 0.14.3 to 0.15.0 (#456)
* Bump Nuke.Common from 5.0.2 to 5.1.1 Bumps [Nuke.Common](https://github.com/nuke-build/nuke) from 5.0.2 to 5.1.1. - [Release notes](https://github.com/nuke-build/nuke/releases) - [Changelog](https://github.com/nuke-build/nuke/blob/develop/CHANGELOG.md) - [Commits](nuke-build/nuke@5.0.2...5.1.1) Signed-off-by: dependabot[bot] <[email protected]> * Bump Rocket.Surgery.Nuke from 0.14.3 to 0.15.0 Bumps [Rocket.Surgery.Nuke](https://github.com/RocketSurgeonsGuild/Nuke) from 0.14.3 to 0.15.0. - [Release notes](https://github.com/RocketSurgeonsGuild/Nuke/releases) - [Changelog](https://github.com/RocketSurgeonsGuild/Nuke/blob/master/GitReleaseManager.yaml) - [Commits](RocketSurgeonsGuild/Nuke@v0.14.3...v0.15.0) Signed-off-by: dependabot[bot] <[email protected]> * Updated nuke Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Driscoll <[email protected]>
1 parent 29be0d8 commit df7b64e

11 files changed

+240
-72
lines changed

.config/dotnet-tools.json

+34-24
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
11
{
2-
"version": 1,
3-
"isRoot": true,
4-
"tools": {
5-
"dotnet-outdated": {
6-
"version": "2.11.0",
7-
"commands": ["dotnet-outdated"]
8-
},
9-
"gitversion.tool": {
10-
"version": "5.6.5",
11-
"commands": ["dotnet-gitversion"]
12-
},
13-
"dotnet-reportgenerator-globaltool": {
14-
"version": "4.8.5",
15-
"commands": ["reportgenerator"]
16-
},
17-
"nuke.globaltool": {
18-
"version": "5.0.2",
19-
"commands": ["nuke"]
20-
},
21-
"codecov.tool": {
22-
"version": "1.12.4",
23-
"commands": ["codecov"]
24-
}
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"dotnet-outdated": {
6+
"version": "2.11.0",
7+
"commands": [
8+
"dotnet-outdated"
9+
]
10+
},
11+
"gitversion.tool": {
12+
"version": "5.6.8",
13+
"commands": [
14+
"dotnet-gitversion"
15+
]
16+
},
17+
"dotnet-reportgenerator-globaltool": {
18+
"version": "4.8.8",
19+
"commands": [
20+
"reportgenerator"
21+
]
22+
},
23+
"nuke.globaltool": {
24+
"version": "5.1.1",
25+
"commands": [
26+
"nuke"
27+
]
28+
},
29+
"codecov.tool": {
30+
"version": "1.13.0",
31+
"commands": [
32+
"codecov"
33+
]
2534
}
26-
}
35+
}
36+
}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ ModelManifest.xml
195195
.nuget/
196196
project.lock.json
197197
*.nupkg
198+
/.nuke/temp/
198199
.automation/
199200
/tools/*/
200201
/tools/*.exe

.nuke

-1
This file was deleted.

.nuke/build.schema.json

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Build Schema",
4+
"$ref": "#/definitions/build",
5+
"definitions": {
6+
"build": {
7+
"type": "object",
8+
"properties": {
9+
"Artifacts": {
10+
"type": "string",
11+
"description": "The directory where artifacts are to be dropped"
12+
},
13+
"Configuration": {
14+
"type": "string",
15+
"description": "Configuration to build",
16+
"enum": [
17+
"Debug",
18+
"Release"
19+
]
20+
},
21+
"Continue": {
22+
"type": "boolean",
23+
"description": "Indicates to continue a previously failed build attempt"
24+
},
25+
"Coverage": {
26+
"type": "string",
27+
"description": "The directory where coverage artifacts are to be dropped"
28+
},
29+
"Help": {
30+
"type": "boolean",
31+
"description": "Shows the help text for this build assembly"
32+
},
33+
"Host": {
34+
"type": "string",
35+
"description": "Host for execution. Default is 'automatic'",
36+
"enum": [
37+
"AppVeyor",
38+
"AzurePipelines",
39+
"Bamboo",
40+
"Bitrise",
41+
"GitHubActions",
42+
"GitLab",
43+
"Jenkins",
44+
"SpaceAutomation",
45+
"TeamCity",
46+
"Terminal",
47+
"TravisCI"
48+
]
49+
},
50+
"LintFiles": {
51+
"type": "array",
52+
"description": "The files to lint, if not given lints all files",
53+
"items": {
54+
"type": "string"
55+
}
56+
},
57+
"LintProfile": {
58+
"type": "string",
59+
"description": "The profile to use for linting"
60+
},
61+
"NoLogo": {
62+
"type": "boolean",
63+
"description": "Disables displaying the NUKE logo"
64+
},
65+
"Plan": {
66+
"type": "boolean",
67+
"description": "Shows the execution plan (HTML)"
68+
},
69+
"Profile": {
70+
"type": "array",
71+
"description": "Defines the profiles to load",
72+
"items": {
73+
"type": "string"
74+
}
75+
},
76+
"Root": {
77+
"type": "string",
78+
"description": "Root directory during build execution"
79+
},
80+
"Skip": {
81+
"type": "array",
82+
"description": "List of targets to be skipped. Empty list skips all dependencies",
83+
"items": {
84+
"type": "string",
85+
"enum": [
86+
"Build",
87+
"BuildVersion",
88+
"Clean",
89+
"CoreBuild",
90+
"CoreRestore",
91+
"CoreTest",
92+
"Default",
93+
"DotnetToolRestore",
94+
"Generate_Code_Coverage_Badges",
95+
"Generate_Code_Coverage_Report",
96+
"Generate_Code_Coverage_Report_Cobertura",
97+
"Generate_Code_Coverage_Summary",
98+
"GenerateReadme",
99+
"Lint",
100+
"Pack",
101+
"Restore",
102+
"Test",
103+
"Trigger_Code_Coverage_Reports"
104+
]
105+
}
106+
},
107+
"Solution": {
108+
"type": "string",
109+
"description": "Path to a solution file that is automatically loaded"
110+
},
111+
"Target": {
112+
"type": "array",
113+
"description": "List of targets to be invoked. Default is '{default_target}'",
114+
"items": {
115+
"type": "string",
116+
"enum": [
117+
"Build",
118+
"BuildVersion",
119+
"Clean",
120+
"CoreBuild",
121+
"CoreRestore",
122+
"CoreTest",
123+
"Default",
124+
"DotnetToolRestore",
125+
"Generate_Code_Coverage_Badges",
126+
"Generate_Code_Coverage_Report",
127+
"Generate_Code_Coverage_Report_Cobertura",
128+
"Generate_Code_Coverage_Summary",
129+
"GenerateReadme",
130+
"Lint",
131+
"Pack",
132+
"Restore",
133+
"Test",
134+
"Trigger_Code_Coverage_Reports"
135+
]
136+
}
137+
},
138+
"Verbosity": {
139+
"type": "string",
140+
"description": "Logging verbosity during build execution. Default is 'Normal'",
141+
"enum": [
142+
"Minimal",
143+
"Normal",
144+
"Quiet",
145+
"Verbose"
146+
]
147+
}
148+
}
149+
}
150+
}
151+
}

.nuke/parameters.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "./build.schema.json",
3+
"Solution": "LaunchPad.sln"
4+
}

Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
2121
</PropertyGroup>
2222
<ItemGroup>
23-
<None Include="$(MSBuildThisFileDirectory)/.tmp/packageicon.png" Condition="Exists('$(MSBuildThisFileDirectory)/.tmp/packageicon.png')" Pack="true" PackagePath="/images/" Visible="false" />
23+
<None Include="$(MSBuildThisFileDirectory)/.nuke/temp/packageicon.png" Condition="Exists('$(MSBuildThisFileDirectory)/.nuke/temp/packageicon.png')" Pack="true" PackagePath="/images/" Visible="false" />
2424
<None Include="$(MSBuildThisFileDirectory)/LICENSE" Pack="true" PackagePath="/" Visible="false"/>
2525
</ItemGroup>
2626
<ItemGroup>

Directory.Packages.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<ItemGroup>
1414
<PackageVersion Include="GitVersion.Tool" Version="5.6.8" />
1515
<PackageVersion Include="JetBrains.ReSharper.GlobalTools" Version="2020.3.3" />
16-
<PackageVersion Include="Nuke.Common" Version="5.0.2" />
16+
<PackageVersion Include="Nuke.Common" Version="5.1.1" />
1717
<PackageVersion Include="ReportGenerator" Version="4.8.8" />
18-
<PackageVersion Include="Rocket.Surgery.Nuke" Version="0.14.3" />
18+
<PackageVersion Include="Rocket.Surgery.Nuke" Version="0.15.0" />
1919
</ItemGroup>
2020
<ItemGroup>
2121
<PackageVersion Include="Newtonsoft.Json" Version="12.0.3" />

build.cmd

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:; set -eo pipefail
2+
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
3+
:; ${SCRIPT_DIR}/build.sh "$@"
4+
:; exit $?
5+
6+
@ECHO OFF
7+
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*

build.ps1

+21-20
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,25 @@ Param(
44
[string[]]$BuildArguments
55
)
66

7-
Write-Output "Windows PowerShell $($Host.Version)"
7+
Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"
88

9-
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { exit 1 }
9+
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }
1010
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
1111

1212
###########################################################################
1313
# CONFIGURATION
1414
###########################################################################
1515

1616
$BuildProjectFile = "$PSScriptRoot\.build\.build.csproj"
17-
$TempDirectory = "$PSScriptRoot\\.tmp"
17+
$TempDirectory = "$PSScriptRoot\\.nuke\temp"
1818

1919
$DotNetGlobalFile = "$PSScriptRoot\\global.json"
20-
$DotNetInstallUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1"
20+
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
2121
$DotNetChannel = "Current"
2222

2323
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
2424
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
25+
$env:DOTNET_MULTILEVEL_LOOKUP = 0
2526

2627
###########################################################################
2728
# EXECUTION
@@ -32,37 +33,37 @@ function ExecSafe([scriptblock] $cmd) {
3233
if ($LASTEXITCODE) { exit $LASTEXITCODE }
3334
}
3435

35-
# If global.json exists, load expected version
36-
if (Test-Path $DotNetGlobalFile) {
37-
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
38-
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
39-
$DotNetVersion = $DotNetGlobal.sdk.version
40-
}
41-
}
42-
43-
# If dotnet is installed locally, and expected version is not set or installation matches the expected version
44-
if ((Get-Command "dotnet" -ErrorAction SilentlyContinue) -ne $null -and `
45-
(!(Test-Path variable:DotNetVersion) -or $(& dotnet --version) -eq $DotNetVersion)) {
36+
# If dotnet CLI is installed globally and it matches requested version, use for execution
37+
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
38+
$(dotnet --version) -and $LASTEXITCODE -eq 0) {
4639
$env:DOTNET_EXE = (Get-Command "dotnet").Path
4740
}
4841
else {
49-
$DotNetDirectory = "$TempDirectory\dotnet-win"
50-
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
51-
5242
# Download install script
5343
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
54-
md -force $TempDirectory > $null
44+
New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null
45+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
5546
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile)
5647

48+
# If global.json exists, load expected version
49+
if (Test-Path $DotNetGlobalFile) {
50+
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
51+
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
52+
$DotNetVersion = $DotNetGlobal.sdk.version
53+
}
54+
}
55+
5756
# Install by channel or version
57+
$DotNetDirectory = "$TempDirectory\dotnet-win"
5858
if (!(Test-Path variable:DotNetVersion)) {
5959
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
6060
} else {
6161
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
6262
}
63+
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
6364
}
6465

6566
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
6667

67-
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false }
68+
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
6869
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }

0 commit comments

Comments
 (0)