# build.ps1 # Erstelle Ausgabeverzeichnis $outDir = "dist" if (-not (Test-Path $outDir)) { New-Item -ItemType Directory -Path $outDir } # Build-Konfigurationen $targets = @( @{OS="windows"; ARCH="amd64"; EXT=".exe"}, @{OS="linux"; ARCH="amd64"; EXT=""}, @{OS="darwin"; ARCH="amd64"; EXT=""} ) # Führe Builds aus foreach ($target in $targets) { $outFile = "clip2snips$($target.EXT)" if ($target.OS -ne "windows") { $outFile = "clip2snips-$($target.OS)$($target.EXT)" } $outPath = Join-Path $outDir $outFile Write-Host "Building for $($target.OS)/$($target.ARCH)..." $env:GOOS = $target.OS $env:GOARCH = $target.ARCH go build -o $outPath } Write-Host "`nBuild completed. Binaries in ./$outDir/:" Get-ChildItem $outDir