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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
Reference in New Issue
Block a user