Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/compile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET 8
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- name: Build with Nuke
run: ./build.sh compile
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET 8
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
dotnet-version: 9.0.*

- name: Publish to NuGet with Nuke
run: ./build.sh push --nuget-api-key ${{ secrets.NUGET_API_KEY }}
Expand Down
137 changes: 73 additions & 64 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,48 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Pack",
"Push",
"Restore"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
Expand All @@ -23,38 +52,13 @@
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"NugetApiKey": {
"type": "string",
"description": "Api key to use when pushing the package"
},
"PackageSource": {
"type": "string",
"description": "NuGet artifact target uri - Defaults to https://api.nuget.org/v3/index.json"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
Expand All @@ -78,45 +82,50 @@
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Pack",
"Push",
"Restore"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Pack",
"Push",
"Restore"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
}
}
}
},
"allOf": [
{
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
"Debug",
"Release"
]
},
"NugetApiKey": {
"type": "string",
"description": "Api key to use when pushing the package"
},
"PackageSource": {
"type": "string",
"description": "NuGet artifact target uri - Defaults to https://api.nuget.org/v3/index.json"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
}
]
}
2 changes: 1 addition & 1 deletion .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "./build.schema.json",
"Solution": "Intility.Logging.sln"
}
}
15 changes: 0 additions & 15 deletions Intility.Logging.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkerSample", "samples\Wor
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MinimalApiSample", "samples\MinimalApiSample\MinimalApiSample.csproj", "{B647AC70-7210-462A-A43C-6EB4AFCB7ED4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Intility.Extensions.Logging.Dynatrace", "src\Intility.Extensions.Logging.Dynatrace\Intility.Extensions.Logging.Dynatrace.csproj", "{B94B9317-E255-4851-9110-0366906EA8A8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{FEC7C612-B49E-41BD-B29A-9EFC84E92F42}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{B27B120C-6614-4A6D-816F-F8B22DBFE789}"
Expand Down Expand Up @@ -124,18 +122,6 @@ Global
{B647AC70-7210-462A-A43C-6EB4AFCB7ED4}.Release|x64.Build.0 = Release|Any CPU
{B647AC70-7210-462A-A43C-6EB4AFCB7ED4}.Release|x86.ActiveCfg = Release|Any CPU
{B647AC70-7210-462A-A43C-6EB4AFCB7ED4}.Release|x86.Build.0 = Release|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Debug|x64.ActiveCfg = Debug|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Debug|x64.Build.0 = Debug|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Debug|x86.ActiveCfg = Debug|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Debug|x86.Build.0 = Debug|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Release|Any CPU.Build.0 = Release|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Release|x64.ActiveCfg = Release|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Release|x64.Build.0 = Release|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Release|x86.ActiveCfg = Release|Any CPU
{B94B9317-E255-4851-9110-0366906EA8A8}.Release|x86.Build.0 = Release|Any CPU
{B27B120C-6614-4A6D-816F-F8B22DBFE789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B27B120C-6614-4A6D-816F-F8B22DBFE789}.Debug|x64.ActiveCfg = Debug|Any CPU
{B27B120C-6614-4A6D-816F-F8B22DBFE789}.Debug|x86.ActiveCfg = Debug|Any CPU
Expand All @@ -154,7 +140,6 @@ Global
{2C7C52E9-835F-4051-9A5E-7D985545A795} = {A5767C5D-9A48-4485-8D5E-686F34B2B766}
{25312E6A-4BA3-4FDF-AA7C-CF2A10CDA2AA} = {A5767C5D-9A48-4485-8D5E-686F34B2B766}
{B647AC70-7210-462A-A43C-6EB4AFCB7ED4} = {A5767C5D-9A48-4485-8D5E-686F34B2B766}
{B94B9317-E255-4851-9110-0366906EA8A8} = {4073E5F4-CD63-4DAA-864D-83A76827807E}
{B27B120C-6614-4A6D-816F-F8B22DBFE789} = {FEC7C612-B49E-41BD-B29A-9EFC84E92F42}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
17 changes: 11 additions & 6 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ $TempDirectory = "$PSScriptRoot\\.nuke\temp"

$DotNetGlobalFile = "$PSScriptRoot\\global.json"
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
$DotNetChannel = "Current"
$DotNetChannel = "STS"

$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
$env:DOTNET_MULTILEVEL_LOOKUP = 0
$env:DOTNET_NOLOGO = 1

###########################################################################
# EXECUTION
Expand Down Expand Up @@ -56,14 +55,20 @@ else {
# Install by channel or version
$DotNetDirectory = "$TempDirectory\dotnet-win"
if (!(Test-Path variable:DotNetVersion)) {
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
} else {
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
$env:PATH = "$DotNetDirectory;$env:PATH"
}

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

if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
}

ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
13 changes: 9 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"

DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
DOTNET_CHANNEL="Current"
DOTNET_CHANNEL="STS"

export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
export DOTNET_MULTILEVEL_LOOKUP=0
export DOTNET_NOLOGO=1

###########################################################################
# EXECUTION
Expand Down Expand Up @@ -54,9 +53,15 @@ else
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
fi
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
export PATH="$DOTNET_DIRECTORY:$PATH"
fi

echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)"
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"

if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then
"$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true
"$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
fi

"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
6 changes: 3 additions & 3 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Build : NukeBuild
/// - Microsoft VisualStudio https://nuke.build/visualstudio
/// - Microsoft VSCode https://nuke.build/vscode

public static int Main () => Execute<Build>(x => x.Compile);
public static int Main() => Execute<Build>(x => x.Compile);

[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
Expand All @@ -37,7 +37,7 @@ class Build : NukeBuild

[Solution] readonly Solution Solution;
[GitRepository] readonly GitRepository GitRepository;
[GitVersion(NoFetch = true, Framework = "net6.0")] readonly GitVersion GitVersion;
[GitVersion(NoFetch = true, Framework = "net9.0")] readonly GitVersion GitVersion;

AbsolutePath SourceDirectory => RootDirectory / "src";
AbsolutePath TestsDirectory => RootDirectory / "tests";
Expand Down Expand Up @@ -90,7 +90,7 @@ class Build : NukeBuild
.DependsOn(Pack)
.Requires(() => NugetApiKey)
.Requires(() => PackageSource)
.Executes(() =>
.Executes(() =>
{
DotNetNuGetPush(s => s
.SetTargetPath(OutputDirectory / $"*.nupkg")
Expand Down
12 changes: 7 additions & 5 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<NoWarn>CS0649;CS0169;CA1050;CA1822;CA2211;IDE1006</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
<NukeScriptDirectory>..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="8.0.0" />
<PackageDownload Include="GitVersion.Tool" Version="[5.8.1]" />
<PackageReference Include="Nuke.Common" Version="9.0.1" />
</ItemGroup>
<ItemGroup>
<PackageDownload Include="GitVersion.Tool" Version="[6.0.5]" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions build/_build.csproj.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VariableHidesOuterVariable/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassNeverInstantiated_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBeMadeStatic_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InterpolatedStringExpressionIsNotIFormattable/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_INTERNAL_MODIFIER/@EntryValue">Implicit</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_PRIVATE_MODIFIER/@EntryValue">Implicit</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/METHOD_OR_OPERATOR_BODY/@EntryValue">ExpressionBody</s:String>
Expand Down
5 changes: 2 additions & 3 deletions samples/MinimalApiSample/MinimalApiSample.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<ProjectReference Include="..\..\src\Intility.Extensions.Logging.Dynatrace\Intility.Extensions.Logging.Dynatrace.csproj" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.0.0" />
<ProjectReference Include="..\..\src\Intility.Extensions.Logging.Elasticsearch\Intility.Extensions.Logging.Elasticsearch.csproj" />
<ProjectReference Include="..\..\src\Intility.Extensions.Logging.Sentry\Intility.Extensions.Logging.Sentry.csproj" />
<ProjectReference Include="..\..\src\Intility.Logging.AspNetCore\Intility.Logging.AspNetCore.csproj" />
Expand Down
Loading