diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index bcf00f7..1a4cf9d 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -2,12 +2,6 @@
"version": 1,
"isRoot": true,
"tools": {
- "dotnet-reportgenerator-globaltool": {
- "version": "4.8.4",
- "commands": [
- "reportgenerator"
- ]
- },
"dotnet-format": {
"version": "4.1.131201",
"commands": [
@@ -15,4 +9,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9898bff..b8924a5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,7 +21,6 @@ on:
env:
IS_STABLE_BUILD: ${{ github.event.inputs.is_stable_build }}
- BUILD_NUMBER: ${{ github.run_number }}
jobs:
build:
diff --git a/Directory.Build.props b/Directory.Build.props
index 37879fb..9d06550 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -37,9 +37,9 @@
1.4.0
beta
true
- $([MSBuild]::ValueOrDefault($(BUILD_NUMBER), 0))
+ $([MSBuild]::ValueOrDefault($(GITHUB_RUN_NUMBER), 0))
$(VersionSuffix).$(BuildNumber)
- $(BUILD_SOURCEVERSION)
+ $(GITHUB_SHA)
$(VersionPrefix)
$(PackageVersion)-$(VersionSuffix)
$(PackageVersion)+$(SourceRevisionId)
diff --git a/build.ps1 b/build.ps1
index 993611d..4fdcb9c 100755
--- a/build.ps1
+++ b/build.ps1
@@ -4,9 +4,7 @@ param(
[ValidateSet('Debug', 'Release')]
$Configuration = $null,
[switch]
- $ci,
- [Parameter(ValueFromRemainingArguments = $true)]
- [string[]]$MSBuildArgs
+ $ci
)
Set-StrictMode -Version 1
@@ -14,22 +12,10 @@ $ErrorActionPreference = 'Stop'
Import-Module -Force -Scope Local "$PSScriptRoot/src/common.psm1"
-#
-# Main
-#
-
if (!$Configuration) {
$Configuration = if ($ci) { 'Release' } else { 'Debug' }
}
-if ($ci) {
- $MSBuildArgs += '-p:CI=true'
-}
-
-if (-not (Test-Path variable:\IsCoreCLR)) {
- $IsWindows = $true
-}
-
$artifacts = "$PSScriptRoot/artifacts/"
Remove-Item -Recurse $artifacts -ErrorAction Ignore
@@ -42,26 +28,10 @@ if ($ci) {
}
exec dotnet tool run dotnet-format -- -v detailed @formatArgs
-
-exec dotnet build --configuration $Configuration '-warnaserror:CS1591' @MSBuildArgs
-exec dotnet pack --no-restore --no-build --configuration $Configuration -o $artifacts @MSBuildArgs
-
-[string[]] $testArgs=@()
-if ($env:TF_BUILD) {
- $testArgs += '--logger', 'trx'
-}
-
-exec dotnet test --no-restore --no-build --configuration $Configuration '-clp:Summary' `
+exec dotnet build --configuration $Configuration '-warnaserror:CS1591'
+exec dotnet pack --no-restore --no-build --configuration $Configuration -o $artifacts
+exec dotnet test --no-restore --no-build --configuration $Configuration `
"$PSScriptRoot/test/Plugins.Tests/McMaster.NETCore.Plugins.Tests.csproj" `
- --collect:"XPlat Code Coverage" `
- @testArgs `
- @MSBuildArgs
-
-if ($ci) {
- exec dotnet tool run reportgenerator `
- "-reports:$PSScriptRoot/**/coverage.cobertura.xml" `
- "-targetdir:$PSScriptRoot/coverlet/reports" `
- "-reporttypes:Cobertura"
-}
+ --collect:"XPlat Code Coverage"
write-host -f green 'BUILD SUCCEEDED'