Skip to content

Commit

Permalink
Update build.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
idg10 committed Sep 3, 2024
1 parent fbe0142 commit a44ca7c
Showing 1 changed file with 8 additions and 34 deletions.
42 changes: 8 additions & 34 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ param (
[string[]] $Tasks = @("."),

[Parameter()]
[string] $Configuration = "Debug",
[string] $Configuration = "Release",

[Parameter()]
[string] $BuildRepositoryUri = "",
Expand All @@ -61,7 +61,7 @@ param (
[string] $PackagesDir = "_packages",

[Parameter()]
[ValidateSet("minimal","normal","detailed")]
[ValidateSet("quiet","minimal","normal","detailed")]
[string] $LogLevel = "minimal",

[Parameter()]
Expand All @@ -71,7 +71,7 @@ param (
[string] $BuildModulePath,

[Parameter()]
[version] $BuildModuleVersion = "1.5.2",
[version] $BuildModuleVersion = "1.5.9",

[Parameter()]
[version] $InvokeBuildModuleVersion = "5.10.3"
Expand Down Expand Up @@ -127,7 +127,7 @@ $SkipVersion = $false
$SkipBuild = $false
$CleanBuild = $Clean
$SkipTest = $false
$SkipTestReport = $true
$SkipTestReport = $false
$SkipPackage = $false
$SkipAnalysis = $false

Expand All @@ -143,22 +143,9 @@ $NuSpecFilesToPackage = @(
# "Solutions/MySolution/MyProject/MyProject.nuspec"
)

#
# Update to the latest report generator versions
$ReportGeneratorToolVersion = "5.1.10"

#
# Specify files to exclude from code coverage
# This option is for excluding generated code
# - Use file path or directory path with globbing (e.g dir1/*.cs)
# - Use single or multiple paths (separated by comma) (e.g. **/dir1/class1.cs,**/dir2/*.cs,**/dir3/**/*.cs)
#
$ExcludeFilesFromCodeCoverage = ""
$CreateGitHubRelease = $true
$PublishNuGetPackagesAsGitHubReleaseArtefacts = $true

#
# Temporarily skip the test report
#
$SkipTestReport = $true

# Synopsis: Build, Test and Package
task . FullBuild
Expand All @@ -176,21 +163,8 @@ task PreBuild {
exec { & git submodule update }
}
task PostBuild {}
task PreTest {
# .net 7 bug workaround - ref: https://github.com/microsoft/vstest/issues/4014
Write-Host "Set temporary ENV vars for MSBuild"
$env:CollectCoverage = $EnableCoverage
$env:CoverletOutputFormat = "cobertura"
}
task PostTest {
Get-ChildItem env:/CollectCoverage
Get-ChildItem env:/CoverletOutputFormat

# cleanup .net 7 bug workaround
Write-Host "Clean-up temporary ENV vars for MSBuild"
Remove-Item env:/CollectCoverage
Remove-Item env:/CoverletOutputFormat
}
task PreTest {}
task PostTest {}
task PreTestReport {}
task PostTestReport {}
task PreAnalysis {}
Expand Down

0 comments on commit a44ca7c

Please sign in to comment.