代码拉取完成,页面将自动刷新
同步操作将从 胡国防/StackExchange.Redis 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
[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"
$projectsToBuild = @(
'StackExchange.Redis',
'NRediSearch'
)
$testsToRun = @(
'StackExchange.Redis.Tests'
)
if ($PullRequestNumber) {
Write-Host "Building for a pull request (#$PullRequestNumber), skipping packaging." -ForegroundColor Yellow
$CreatePackages = $false
}
Write-Host "Building projects..." -ForegroundColor "Magenta"
foreach ($project in $projectsToBuild) {
Write-Host "Building $project (dotnet restore/build)..." -ForegroundColor "Magenta"
dotnet restore ".\src\$project\$project.csproj" /p:CI=true
dotnet build ".\src\$project\$project.csproj" -c Release /p:CI=true
Write-Host ""
}
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"
}
foreach ($project in $testsToRun) {
Write-Host "Running tests: $project (all frameworks)" -ForegroundColor "Magenta"
#Push-Location ".\tests\$project"
Push-Location ".\tests\$project"
dotnet test -c Release
if ($LastExitCode -ne 0) {
Write-Host "Error with tests, aborting build." -Foreground "Red"
Pop-Location
Exit 1
}
Write-Host "Tests passed!" -ForegroundColor "Green"
Pop-Location
}
}
if ($CreatePackages) {
mkdir -Force $packageOutputFolder | 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"
foreach ($project in $projectsToBuild) {
Write-Host "Packing $project (dotnet pack)..." -ForegroundColor "Magenta"
dotnet pack ".\src\$project\$project.csproj" --no-build -c Release /p:PackageOutputPath=$packageOutputFolder /p:NoPackageAnalysis=true /p:CI=true
Write-Host ""
}
}
Write-Host "Done."
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。