Initialize Infstar Paper-based server core
This commit is contained in:
@@ -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 和兼容性测试。"
|
||||
Reference in New Issue
Block a user