1 Star 0 Fork 0

ces/StackExchange.Redis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.ps1 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
[CmdletBinding(PositionalBinding=$false)]
param(
[bool] $CreatePackages,
[switch] $StartServers,
[bool] $RunTests = $true,
[string] $PullRequestNumber
)
Write-Host "Run Parameters:" -ForegroundColor Cyan
Write-Host " CreatePackages: $CreatePackages"
Write-Host " RunTests: $RunTests"
Write-Host " dotnet --version:" (dotnet --version)
$packageOutputFolder = "$PSScriptRoot\.nupkgs"
if ($PullRequestNumber) {
Write-Host "Building for a pull request (#$PullRequestNumber), skipping packaging." -ForegroundColor Yellow
$CreatePackages = $false
}
Write-Host "Building all projects (Build.csproj traversal)..." -ForegroundColor "Magenta"
dotnet build ".\Build.csproj" -c Release /p:CI=true
Write-Host "Done building." -ForegroundColor "Green"
if ($RunTests) {
if ($StartServers) {
Write-Host "Starting all servers for testing: $project (all frameworks)" -ForegroundColor "Magenta"
& .\RedisConfigs\start-all.cmd
Write-Host "Servers Started." -ForegroundColor "Green"
}
Write-Host "Running tests: Build.csproj traversal (all frameworks)" -ForegroundColor "Magenta"
dotnet test ".\Build.csproj" -c Release --no-build --logger trx
if ($LastExitCode -ne 0) {
Write-Host "Error with tests, aborting build." -Foreground "Red"
Exit 1
}
Write-Host "Tests passed!" -ForegroundColor "Green"
}
if ($CreatePackages) {
New-Item -ItemType Directory -Path $packageOutputFolder -Force | Out-Null
Write-Host "Clearing existing $packageOutputFolder..." -NoNewline
Get-ChildItem $packageOutputFolder | Remove-Item
Write-Host "done." -ForegroundColor "Green"
Write-Host "Building all packages" -ForegroundColor "Green"
dotnet pack ".\Build.csproj" --no-build -c Release /p:PackageOutputPath=$packageOutputFolder /p:CI=true
}
Write-Host "Done."
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sqweqwrqrqr/StackExchange.Redis.git
[email protected]:sqweqwrqrqr/StackExchange.Redis.git
sqweqwrqrqr
StackExchange.Redis
StackExchange.Redis
async-backlog

搜索帮助