Initial project scaffold for Dimma

This commit is contained in:
2026-06-10 20:53:30 +02:00
commit 64f55c81b0
17 changed files with 702 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# Build script for Go updater (PowerShell)
# Usage: .\build.ps1 [os] [arch]
# Default: builds for current OS/architecture
$MODULE = "gitea.sanplex.xyz/Sansan/dimma-updater"
$OUTPUT_DIR = "..\build"
$BIN_NAME = "go-updater"
$OS = if ($args.Count -gt 0) { $args[0] } else { $env:GOOS }
$ARCH = if ($args.Count -gt 1) { $args[1] } else { $env:GOARCH }
if ($OS -eq "windows") { $EXT = ".exe" } else { $EXT = "" }
$OUTPUT = "$OUTPUT_DIR\$BIN_NAME-$OS-$ARCH$EXT"
New-Item -ItemType Directory -Force -Path $OUTPUT_DIR | Out-Null
Write-Host "Building Go updater for $OS/$ARCH..."
Write-Host "Output: $OUTPUT"
go build -o $OUTPUT .\
if ($OS -eq "linux" -or $OS -eq "darwin") {
# On Unix-like systems, make executable
if ($IsLinux -or $IsMacOS) {
chmod +x $OUTPUT
}
}
Write-Host "Build complete: $OUTPUT"