diff --git a/build.ps1 b/build.ps1 index 14daa1f45..e3ded1671 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,43 +1,43 @@ - param ( - [string]$SHA = "" - ) - -if ($SHA -eq ""){ - $SHA = (git rev-parse HEAD) | Out-String - $SHA = $SHA.Replace([System.Environment]::NewLine,"") -} - - -$PKG = "github.com/StackExchange/dnscontrol" -$DATE = [int][double]::Parse((Get-Date -UFormat %s)) -$FLAGS="-mod=readonly -s -w -X main.SHA=$SHA -X main.BuildTime=$DATE" -Write-Host $FLAGS - -$OrigGOOS = $env:GOOS - -$env:GO111MODULE = "on" - -Write-Host 'Building Linux' -$env:GOOS = "linux" -go build -o dnscontrol-Linux -ldflags "$FLAGS" $PKG - -Write-Host 'Building Windows' -$env:GOOS = "windows" -go build -o dnscontrol.exe -ldflags "$FLAGS" $PKG - -Write-Host 'Building Darwin' -$env:GOOS = "darwin" -go build -o dnscontrol-Darwin -ldflags "$FLAGS" $PKG - -$env:GOOS = $OrigGOOS - -#No compression if building on windows -<# -if [ "$COMPRESS" = "1" ] -then - echo 'Compressing executables' - upx dnscontrol.exe - upx dnscontrol-Linux - upx dnscontrol-Darwin -fi + param ( + [string]$SHA = "" + ) + +if ($SHA -eq ""){ + $SHA = (git rev-parse HEAD) | Out-String + $SHA = $SHA.Replace([System.Environment]::NewLine,"") +} + + +$PKG = "github.com/StackExchange/dnscontrol" +$DATE = [int][double]::Parse((Get-Date -UFormat %s)) +$FLAGS="-mod=readonly -s -w -X main.SHA=$SHA -X main.BuildTime=$DATE" +Write-Host $FLAGS + +$OrigGOOS = $env:GOOS + +$env:GO111MODULE = "on" + +Write-Host 'Building Linux' +$env:GOOS = "linux" +go build -o dnscontrol-Linux -ldflags "$FLAGS" $PKG + +Write-Host 'Building Windows' +$env:GOOS = "windows" +go build -o dnscontrol.exe -ldflags "$FLAGS" $PKG + +Write-Host 'Building Darwin' +$env:GOOS = "darwin" +go build -o dnscontrol-Darwin -ldflags "$FLAGS" $PKG + +$env:GOOS = $OrigGOOS + +#No compression if building on windows +<# +if [ "$COMPRESS" = "1" ] +then + echo 'Compressing executables' + upx dnscontrol.exe + upx dnscontrol-Linux + upx dnscontrol-Darwin +fi #> \ No newline at end of file diff --git a/dnscontrol.nuspec b/dnscontrol.nuspec index 6eaded4ef..c627772c0 100644 --- a/dnscontrol.nuspec +++ b/dnscontrol.nuspec @@ -1,23 +1,23 @@ - - - - - dnscontrol - 0.0.0 - DnsControl - Stack Overflow - https://github.com/stackexchange/dnscontrol - 2020 - https://github.com/StackExchange/dnscontrol/blob/master/LICENSE - true - https://github.com/stackexchange/dnscontrol - https://stackexchange.github.io/dnscontrol/ - dns - Synchronize your DNS to multiple providers from a simple DSL - This package simply installs the dnscontrol tool on your system - - - - - - + + + + + dnscontrol + 0.0.0 + DnsControl + Stack Overflow + https://github.com/stackexchange/dnscontrol + 2020 + https://github.com/StackExchange/dnscontrol/blob/master/LICENSE + true + https://github.com/stackexchange/dnscontrol + https://stackexchange.github.io/dnscontrol/ + dns + Synchronize your DNS to multiple providers from a simple DSL + This package simply installs the dnscontrol tool on your system + + + + + +