Initiales Commit: Multi-Plattform Clipboard zu snips.sh Integration

This commit is contained in:
2025-03-31 14:50:58 +02:00
commit bfd200f1ec
5 changed files with 198 additions and 0 deletions

32
build.ps1 Normal file
View File

@@ -0,0 +1,32 @@
# 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