feat(receiver): 持久化接收机发现端点并支持位置备注信息
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$ridTools = 'D:/Rust_Contact/util/tools/rid-map-downloader/0.1.0'
|
||||
$env:GOCACHE = 'D:/Rust_Contact/util/tools/go-cache'
|
||||
$env:GOMODCACHE = 'D:/Rust_Contact/util/tools/go-modules'
|
||||
$ridGo = (Get-Command go -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1).Source
|
||||
if (-not $ridGo) { $ridGo = 'D:/Rust_Contact/util/tools/go/1.27.4/go/bin/go.exe' }
|
||||
if (-not (Test-Path -LiteralPath $ridGo -PathType Leaf)) {
|
||||
throw '找不到 Go。请将 go.exe 加入 PATH 或安装到项目统一工具目录。'
|
||||
}
|
||||
New-Item -ItemType Directory -Force $ridTools | Out-Null
|
||||
Push-Location (Join-Path $PSScriptRoot 'map-downloader')
|
||||
try {
|
||||
go test ./...
|
||||
& $ridGo test ./...
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Go map downloader tests failed' }
|
||||
go build -trimpath -ldflags '-s -w' -o (Join-Path $ridTools 'rid-map-downloader.exe') .
|
||||
& $ridGo build -trimpath -ldflags '-s -w' -o (Join-Path $ridTools 'rid-map-downloader.exe') .
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Go map downloader build failed' }
|
||||
Copy-Item -LiteralPath 'LICENSE-upstream.txt' -Destination $ridTools
|
||||
$env:RID_MAP_DOWNLOADER = Join-Path $ridTools 'rid-map-downloader.exe'
|
||||
|
||||
Reference in New Issue
Block a user