Initiales Commit: Multi-Plattform Clipboard zu snips.sh Integration
This commit is contained in:
32
build.ps1
Normal file
32
build.ps1
Normal 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
|
Reference in New Issue
Block a user