Skip to content

Commit 7b7d9dc

Browse files
committed
Merge branch 'devel'
2 parents 64ac602 + 65fc194 commit 7b7d9dc

27 files changed

+1320
-378
lines changed

.github/workflows/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ jobs:
5050
steps:
5151
- uses: actions/checkout@v2
5252

53-
- uses: actions/setup-dotnet@v1
53+
- name: Setup dotnet
54+
uses: actions/setup-dotnet@v1
5455
with:
5556
dotnet-version: |
56-
3.1.x
57-
5.0.x
5857
6.0.x
58+
7.0.x
5959
6060
- name: Build
6161
run: ./build.sh
@@ -66,12 +66,12 @@ jobs:
6666
steps:
6767
- uses: actions/checkout@v2
6868

69-
- uses: actions/setup-dotnet@v1
69+
- name: Setup dotnet
70+
uses: actions/setup-dotnet@v1
7071
with:
7172
dotnet-version: |
72-
3.1.x
73-
5.0.x
7473
6.0.x
74+
7.0.x
7575
7676
- name: Build
7777
run: |

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,6 @@ pip-log.txt
194194

195195
# Mac crap
196196
.DS_Store
197+
198+
# Nuke build tool
199+
.nuke/temp

.nuke/build.schema.json

+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
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+
"Configuration": {
10+
"type": "string",
11+
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
12+
"enum": [
13+
"Debug",
14+
"Release"
15+
]
16+
},
17+
"Continue": {
18+
"type": "boolean",
19+
"description": "Indicates to continue a previously failed build attempt"
20+
},
21+
"Help": {
22+
"type": "boolean",
23+
"description": "Shows the help text for this build assembly"
24+
},
25+
"Host": {
26+
"type": "string",
27+
"description": "Host for execution. Default is 'automatic'",
28+
"enum": [
29+
"AppVeyor",
30+
"AzurePipelines",
31+
"Bamboo",
32+
"Bitbucket",
33+
"Bitrise",
34+
"GitHubActions",
35+
"GitLab",
36+
"Jenkins",
37+
"Rider",
38+
"SpaceAutomation",
39+
"TeamCity",
40+
"Terminal",
41+
"TravisCI",
42+
"VisualStudio",
43+
"VSCode"
44+
]
45+
},
46+
"NoLogo": {
47+
"type": "boolean",
48+
"description": "Disables displaying the NUKE logo"
49+
},
50+
"Partition": {
51+
"type": "string",
52+
"description": "Partition to use on CI"
53+
},
54+
"Plan": {
55+
"type": "boolean",
56+
"description": "Shows the execution plan (HTML)"
57+
},
58+
"Profile": {
59+
"type": "array",
60+
"description": "Defines the profiles to load",
61+
"items": {
62+
"type": "string"
63+
}
64+
},
65+
"ReleaseNotesFilePath": {
66+
"type": "string",
67+
"description": "ReleaseNotesFilePath - To determine the SemanticVersion"
68+
},
69+
"Root": {
70+
"type": "string",
71+
"description": "Root directory during build execution"
72+
},
73+
"Skip": {
74+
"type": "array",
75+
"description": "List of targets to be skipped. Empty list skips all dependencies",
76+
"items": {
77+
"type": "string",
78+
"enum": [
79+
"Clean",
80+
"Compile",
81+
"CopyFiles",
82+
"CreatePackage",
83+
"Default",
84+
"Package",
85+
"PrePublish",
86+
"Publish",
87+
"PublishPackage",
88+
"PublishPreRelease",
89+
"PublishRelease",
90+
"Restore",
91+
"RunUnitTests"
92+
]
93+
}
94+
},
95+
"Solution": {
96+
"type": "string",
97+
"description": "Path to a solution file that is automatically loaded"
98+
},
99+
"Target": {
100+
"type": "array",
101+
"description": "List of targets to be invoked. Default is '{default_target}'",
102+
"items": {
103+
"type": "string",
104+
"enum": [
105+
"Clean",
106+
"Compile",
107+
"CopyFiles",
108+
"CreatePackage",
109+
"Default",
110+
"Package",
111+
"PrePublish",
112+
"Publish",
113+
"PublishPackage",
114+
"PublishPreRelease",
115+
"PublishRelease",
116+
"Restore",
117+
"RunUnitTests"
118+
]
119+
}
120+
},
121+
"Verbosity": {
122+
"type": "string",
123+
"description": "Logging verbosity during build execution. Default is 'Normal'",
124+
"enum": [
125+
"Minimal",
126+
"Normal",
127+
"Quiet",
128+
"Verbose"
129+
]
130+
}
131+
}
132+
}
133+
}
134+
}

.nuke/parameters.json

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

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 1.0.0
2+
3+
Released on Sunday, January 15 2023.
4+
5+
- Updated to use AngleSharp 1.0
6+
17
# 0.17.0
28

39
Released on Tuesday, May 31 2022.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013 - 2022 AngleSharp
3+
Copyright (c) 2013 - 2023 AngleSharp
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# AngleSharp.Xml
44

5-
[![Build Status](https://img.shields.io/appveyor/ci/FlorianRappl/AngleSharp-Xml.svg?style=flat-square)](https://ci.appveyor.com/project/FlorianRappl/AngleSharp-Xml)
5+
[![CI](https://github.com/AngleSharp/AngleSharp.Xml/actions/workflows/ci.yml/badge.svg)](https://github.com/AngleSharp/AngleSharp.Xml/actions/workflows/ci.yml)
66
[![GitHub Tag](https://img.shields.io/github/tag/AngleSharp/AngleSharp.Xml.svg?style=flat-square)](https://github.com/AngleSharp/AngleSharp.Xml/releases)
77
[![NuGet Count](https://img.shields.io/nuget/dt/AngleSharp.Xml.svg?style=flat-square)](https://www.nuget.org/packages/AngleSharp.Xml/)
88
[![Issues Open](https://img.shields.io/github/issues/AngleSharp/AngleSharp.Xml.svg?style=flat-square)](https://github.com/AngleSharp/AngleSharp.Xml/issues)
@@ -74,7 +74,7 @@ This project is supported by the [.NET Foundation](https://dotnetfoundation.org)
7474

7575
The MIT License (MIT)
7676

77-
Copyright (c) 2020 - 2022 AngleSharp
77+
Copyright (c) 2020 - 2023 AngleSharp
7878

7979
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8080

build.cake

-13
This file was deleted.

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

+51-63
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,69 @@
1+
[CmdletBinding()]
12
Param(
2-
[string]$Script = "build.cake",
3-
[string]$Target = "Default",
4-
[ValidateSet("Release", "Debug")]
5-
[string]$Configuration = "Release",
6-
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
7-
[string]$Verbosity = "Verbose",
8-
[switch]$Experimental,
9-
[switch]$WhatIf,
10-
[switch]$Mono,
11-
[switch]$SkipToolPackageRestore,
123
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
13-
[string[]]$ScriptArgs
4+
[string[]]$BuildArguments
145
)
156

16-
$PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition;
17-
$UseDryRun = "";
18-
$UseMono = "";
19-
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
20-
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
21-
$NUGET_OLD_EXE = Join-Path $TOOLS_DIR "nuget_old.exe"
22-
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
23-
$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
24-
$NUGET_OLD_URL = "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe"
7+
Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"
258

26-
# Should we use experimental build of Roslyn?
27-
$UseExperimental = "";
28-
if ($Experimental.IsPresent) {
29-
$UseExperimental = "--experimental"
30-
}
9+
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }
10+
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
3111

32-
# Is this a dry run?
33-
if ($WhatIf.IsPresent) {
34-
$UseDryRun = "--dryrun"
35-
}
12+
###########################################################################
13+
# CONFIGURATION
14+
###########################################################################
3615

37-
# Should we use mono?
38-
if ($Mono.IsPresent) {
39-
$UseMono = "--mono"
40-
}
16+
$BuildProjectFile = "$PSScriptRoot\nuke\_build.csproj"
17+
$TempDirectory = "$PSScriptRoot\\.nuke\temp"
4118

42-
# Try download NuGet.exe if do not exist.
43-
if (!(Test-Path $NUGET_EXE)) {
44-
(New-Object System.Net.WebClient).DownloadFile($NUGET_URL, $NUGET_EXE)
45-
}
19+
$DotNetGlobalFile = "$PSScriptRoot\\global.json"
20+
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
21+
$DotNetChannel = "Current"
4622

47-
# Try download NuGet.exe if do not exist.
48-
if (!(Test-Path $NUGET_OLD_URL)) {
49-
(New-Object System.Net.WebClient).DownloadFile($NUGET_OLD_URL, $NUGET_OLD_EXE)
50-
}
23+
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
24+
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
25+
$env:DOTNET_MULTILEVEL_LOOKUP = 0
5126

52-
# Make sure NuGet (latest) exists where we expect it.
53-
if (!(Test-Path $NUGET_EXE)) {
54-
Throw "Could not find nuget.exe"
27+
###########################################################################
28+
# EXECUTION
29+
###########################################################################
30+
31+
function ExecSafe([scriptblock] $cmd) {
32+
& $cmd
33+
if ($LASTEXITCODE) { exit $LASTEXITCODE }
5534
}
5635

57-
# Make sure NuGet (v3.5.0) exists where we expect it.
58-
if (!(Test-Path $NUGET_OLD_EXE)) {
59-
Throw "Could not find nuget_old.exe"
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) {
39+
$env:DOTNET_EXE = (Get-Command "dotnet").Path
6040
}
41+
else {
42+
# Download install script
43+
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
44+
New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null
45+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
46+
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile)
6147

62-
# Restore tools from NuGet?
63-
if (-Not $SkipToolPackageRestore.IsPresent)
64-
{
65-
Push-Location
66-
Set-Location $TOOLS_DIR
67-
Invoke-Expression "$NUGET_EXE install -ExcludeVersion"
68-
Pop-Location
69-
if ($LASTEXITCODE -ne 0) {
70-
exit $LASTEXITCODE
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+
}
7154
}
72-
}
7355

74-
# Make sure that Cake has been installed.
75-
if (!(Test-Path $CAKE_EXE)) {
76-
Throw "Could not find Cake.exe"
56+
# Install by channel or version
57+
$DotNetDirectory = "$TempDirectory\dotnet-win"
58+
if (!(Test-Path variable:DotNetVersion)) {
59+
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
60+
} else {
61+
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
62+
}
63+
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
7764
}
7865

79-
# Start Cake
80-
Invoke-Expression "$CAKE_EXE `"$Script`" --target=`"$Target`" --configuration=`"$Configuration`" --verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs"
81-
exit $LASTEXITCODE
66+
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"
67+
68+
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
69+
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }

0 commit comments

Comments
 (0)