diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
index c1999a9..7616e4d 100644
--- a/.nuke/build.schema.json
+++ b/.nuke/build.schema.json
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "title": "Build Schema",
"$ref": "#/definitions/build",
+ "title": "Build Schema",
"definitions": {
"build": {
"type": "object",
@@ -131,4 +131,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/build.cmd b/build.cmd
old mode 100644
new mode 100755
diff --git a/build.ps1 b/build.ps1
index 1f264e7..3cca4ef 100644
--- a/build.ps1
+++ b/build.ps1
@@ -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
@@ -61,9 +60,15 @@ else {
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
+ $env:PATH = "$DotNetDirectory;$env:PATH"
}
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 }
diff --git a/build.sh b/build.sh
index 7534123..a226b96 100755
--- a/build.sh
+++ b/build.sh
@@ -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
@@ -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 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 -- "$@"
diff --git a/nuke/Build.cs b/nuke/Build.cs
index 43ecd98..5773b74 100644
--- a/nuke/Build.cs
+++ b/nuke/Build.cs
@@ -100,7 +100,7 @@ protected override void OnBuildInitialized()
Log.Information("Building version: {Version}", Version);
- TargetProject = Solution.GetProject(SourceDirectory / TargetProjectName / $"{TargetLibName}.csproj" );
+ TargetProject = Solution.GetProject(TargetLibName);
TargetProject.NotNull("TargetProject could not be loaded!");
TargetFrameworks = TargetProject.GetTargetFrameworks();
@@ -113,7 +113,7 @@ protected override void OnBuildInitialized()
.Before(Restore)
.Executes(() =>
{
- SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(DeleteDirectory);
+ SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(x => x.DeleteDirectory());
});
Target Restore => _ => _
@@ -130,6 +130,7 @@ protected override void OnBuildInitialized()
DotNetBuild(s => s
.SetProjectFile(Solution)
.SetConfiguration(Configuration)
+ .SetContinuousIntegrationBuild(IsServerBuild)
.EnableNoRestore());
});
@@ -183,9 +184,9 @@ protected override void OnBuildInitialized()
.SetTargetPath(nuspec)
.SetVersion(Version)
.SetOutputDirectory(NugetDirectory)
- .SetSymbols(true)
- .SetSymbolPackageFormat("snupkg")
- .AddProperty("Configuration", Configuration)
+ .EnableSymbols()
+ .SetSymbolPackageFormat(NuGetSymbolPackageFormat.snupkg)
+ .SetConfiguration(Configuration)
);
});
@@ -202,7 +203,7 @@ protected override void OnBuildInitialized()
throw new BuildAbortedException("Could not resolve the NuGet API key.");
}
- foreach (var nupkg in GlobFiles(NugetDirectory, "*.nupkg"))
+ foreach (var nupkg in NugetDirectory.GlobFiles("*.nupkg"))
{
NuGetPush(s => s
.SetTargetPath(nupkg)
diff --git a/nuke/_build.csproj b/nuke/_build.csproj
index 7521e1b..a71fa1b 100644
--- a/nuke/_build.csproj
+++ b/nuke/_build.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
CS0649;CS0169
..
@@ -11,7 +11,7 @@
-
+
diff --git a/src/AngleSharp.Js.sln b/src/AngleSharp.Js.sln
index 46555c8..4ef0c1c 100644
--- a/src/AngleSharp.Js.sln
+++ b/src/AngleSharp.Js.sln
@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AngleSharp.Js", "AngleSharp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AngleSharp.Js.Tests", "AngleSharp.Js.Tests\AngleSharp.Js.Tests.csproj", "{18B0B97B-8795-4DC2-A1E7-8070255BE718}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_build", "..\nuke\_build.csproj", "{07DA52AA-8F6F-4F43-B09E-6AE899E95E43}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU