首次推送
build / build-and-test (push) Failing after 1m24s

This commit is contained in:
2026-10-18 19:44:38 +08:00
commit f047662129
64 changed files with 10454 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
# 离线构建脚本:本机无法访问任何 Go 模块源,全部依赖取自本地模块缓存
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
$env:GOFLAGS = '-mod=mod'
$env:GOPROXY = 'off'
$env:GOSUMDB = 'off'
$env:GOCACHE = Join-Path $root '.gocache'
$env:GOTMPDIR = Join-Path $root '.gotmp'
New-Item -ItemType Directory -Force -Path $env:GOCACHE, $env:GOTMPDIR | Out-Null
Push-Location $root
try {
Write-Host '正在编译…' -ForegroundColor Cyan
go build -trimpath -ldflags '-s -w' -o daili.exe .
if ($LASTEXITCODE -ne 0) { throw "编译失败(退出码 $LASTEXITCODE)" }
$f = Get-Item daili.exe
Write-Host ("编译完成: {0} {1:N1} MB" -f $f.Name, ($f.Length / 1MB)) -ForegroundColor Green
} finally {
Pop-Location
}