embed readme
This commit is contained in:
11
build.ps1
11
build.ps1
@@ -112,9 +112,14 @@ if ($Standalone) {
|
||||
|
||||
$exeName = "hpl-toolbox-$version.exe"
|
||||
$exeOut = Join-Path $distDir $exeName
|
||||
go build -ldflags="-s -w -H windowsgui -X main.AppVersion=$version" -trimpath -o $exeOut .
|
||||
if ($LASTEXITCODE -ne 0) { Write-Error "go build failed"; exit 1 }
|
||||
Copy-Item -Path (Join-Path $repoRoot "README.md") -Destination (Join-Path $distDir "README.md") -Force
|
||||
$embeddedReadme = Join-Path (Get-Location) "README.md"
|
||||
Copy-Item -Path (Join-Path $repoRoot "README.md") -Destination $embeddedReadme -Force
|
||||
try {
|
||||
go build -tags release -ldflags="-s -w -H windowsgui -X main.AppVersion=$version" -trimpath -o $exeOut .
|
||||
if ($LASTEXITCODE -ne 0) { Write-Error "go build failed"; exit 1 }
|
||||
} finally {
|
||||
Remove-Item -Path $embeddedReadme -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
$summary += [pscustomobject]@{
|
||||
Artifact = $exeName
|
||||
|
||||
Reference in New Issue
Block a user