3 Commits
8 changed files with 11 additions and 5 deletions
+5 -3
View File
@@ -78,12 +78,14 @@ if (-not (Test-Path $OutputDir)) {
Write-Host "Created output directory: $OutputDir" -ForegroundColor Green
}
# Build flags
$ldflags = ""
# Build flags — always inject version and copyright year; release builds also strip debug symbols.
$buildYear = (Get-Date).Year
$injectedFlags = "-X main.version=$gitTag -X main.copyrightYear=$buildYear"
if ($Release) {
$ldflags = "-s -w"
$ldflags = "-s -w $injectedFlags"
Write-Host "Building RELEASE version (optimized, no debug symbols)..." -ForegroundColor Green
} else {
$ldflags = $injectedFlags
Write-Host "Building DEBUG version (with debug symbols)..." -ForegroundColor Yellow
}
+6 -2
View File
@@ -14,10 +14,14 @@ import (
"ekdns/resolver"
)
// version and copyrightYear are set at build time via -ldflags.
var version = "dev"
var copyrightYear = "2024"
func main() {
// Banner (always printed to stdout).
fmt.Println("ekDNSHelper v1.0")
fmt.Println("Copyright (c) 2024 Emberkom LLC")
fmt.Printf("ekDNSHelper %s\n", version)
fmt.Printf("Copyright (c) %s Emberkom LLC\n", copyrightYear)
fmt.Println("")
if len(os.Args) < 2 {
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.