Initialize Infstar Paper-based server core

This commit is contained in:
Coldsmiles
2026-09-13 18:08:00 +08:00
commit 5c27681d1d
22 changed files with 1502 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
param(
[Parameter(Mandatory = $true)]
[ValidatePattern('^[0-9a-fA-F]{40}$')]
[string] $PaperCommit
)
$propertiesPath = Join-Path $PSScriptRoot "..\gradle.properties"
$properties = Get-Content -LiteralPath $propertiesPath -Raw
$updated = [regex]::Replace($properties, '(?m)^paperCommit=.*$', "paperCommit=$PaperCommit")
if ($updated -eq $properties) {
throw "paperCommit was not found in $propertiesPath"
}
Set-Content -LiteralPath $propertiesPath -Value $updated -NoNewline
Write-Output "已将 Paper 固定到 $PaperCommit。合并前请运行 applyAllPatches 和兼容性测试。"