BlueGit

timfa posprint

Files

posprint / scripts / build-windows.ps1

build-windows.ps1

434b9b15 History
build-windows.ps1 582 B Download Raw
1#Requires -Version 5.1
2param(
3 [switch]$SkipTests
4)
5
6$ErrorActionPreference = "Stop"
7$Root = Split-Path -Parent $PSScriptRoot
8Set-Location $Root
9
10Write-Host "Building posprint for Windows (x64)..."
11
12if (-not $SkipTests) {
13 cargo test
14 if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
15}
16
17cargo build --release
18if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
19
20$exe = Join-Path $Root "target\release\posprint.exe"
21if (-not (Test-Path $exe)) {
22 Write-Error "Build failed: $exe not found"
23}
24
25Write-Host "OK: $exe"
26Get-Item $exe | Select-Object FullName, Length, LastWriteTime