feat: Update build script to inject version at build time and add new release binaries for ekdns v2.1.0

This commit is contained in:
2026-03-04 18:27:26 -05:00
parent 25aa16be14
commit 80bb7d45f8
14 changed files with 8 additions and 4 deletions
+4 -3
View File
@@ -78,12 +78,13 @@ if (-not (Test-Path $OutputDir)) {
Write-Host "Created output directory: $OutputDir" -ForegroundColor Green
}
# Build flags
$ldflags = ""
# Build flags — always inject version; release builds also strip debug symbols.
$versionLdflag = "-X main.version=$gitTag"
if ($Release) {
$ldflags = "-s -w"
$ldflags = "-s -w $versionLdflag"
Write-Host "Building RELEASE version (optimized, no debug symbols)..." -ForegroundColor Green
} else {
$ldflags = $versionLdflag
Write-Host "Building DEBUG version (with debug symbols)..." -ForegroundColor Yellow
}
+4 -1
View File
@@ -14,9 +14,12 @@ import (
"ekdns/resolver"
)
// version is set at build time via -ldflags "-X main.version=..."
var version = "dev"
func main() {
// Banner (always printed to stdout).
fmt.Println("ekDNSHelper v1.0")
fmt.Printf("ekDNSHelper %s\n", version)
fmt.Println("Copyright (c) 2024 Emberkom LLC")
fmt.Println("")
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.