1 Star 0 Fork 0

code shelter/DotNetCorePlugins

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.ps1 1011 Bytes
一键复制 编辑 原始数据 按行查看 历史
Nate McMaster 提交于 2021-01-30 22:47 . Simplify CI settings
#!/usr/bin/env pwsh
[CmdletBinding(PositionalBinding = $false)]
param(
[ValidateSet('Debug', 'Release')]
$Configuration = $null,
[switch]
$ci
)
Set-StrictMode -Version 1
$ErrorActionPreference = 'Stop'
Import-Module -Force -Scope Local "$PSScriptRoot/src/common.psm1"
if (!$Configuration) {
$Configuration = if ($ci) { 'Release' } else { 'Debug' }
}
$artifacts = "$PSScriptRoot/artifacts/"
Remove-Item -Recurse $artifacts -ErrorAction Ignore
exec dotnet tool restore
[string[]] $formatArgs=@()
if ($ci) {
$formatArgs += '--check'
}
exec dotnet tool run dotnet-format -- -v detailed @formatArgs
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"
write-host -f green 'BUILD SUCCEEDED'
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/codeshelter/DotNetCorePlugins.git
[email protected]:codeshelter/DotNetCorePlugins.git
codeshelter
DotNetCorePlugins
DotNetCorePlugins
main

搜索帮助