mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-06 05:04:29 +08:00
Problem with restore
This commit is contained in:
parent
0893f74895
commit
d62ee174fd
2 changed files with 65 additions and 65 deletions
84
build.ps1
84
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
|
||||
#>
|
|
@ -1,23 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>dnscontrol</id>
|
||||
<version>0.0.0</version>
|
||||
<title>DnsControl</title>
|
||||
<authors>Stack Overflow</authors>
|
||||
<projectUrl>https://github.com/stackexchange/dnscontrol</projectUrl>
|
||||
<copyright>2020</copyright>
|
||||
<licenseUrl>https://github.com/StackExchange/dnscontrol/blob/master/LICENSE</licenseUrl>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<projectSourceUrl>https://github.com/stackexchange/dnscontrol</projectSourceUrl>
|
||||
<docsUrl>https://stackexchange.github.io/dnscontrol/</docsUrl>
|
||||
<tags>dns</tags>
|
||||
<summary>Synchronize your DNS to multiple providers from a simple DSL</summary>
|
||||
<description>This package simply installs the dnscontrol tool on your system</description>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="dnscontrol.exe" target="tools" />
|
||||
<!--Building from Linux? You may need this instead: <file src="tools/**" target="tools" />-->
|
||||
</files>
|
||||
</package>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>dnscontrol</id>
|
||||
<version>0.0.0</version>
|
||||
<title>DnsControl</title>
|
||||
<authors>Stack Overflow</authors>
|
||||
<projectUrl>https://github.com/stackexchange/dnscontrol</projectUrl>
|
||||
<copyright>2020</copyright>
|
||||
<licenseUrl>https://github.com/StackExchange/dnscontrol/blob/master/LICENSE</licenseUrl>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<projectSourceUrl>https://github.com/stackexchange/dnscontrol</projectSourceUrl>
|
||||
<docsUrl>https://stackexchange.github.io/dnscontrol/</docsUrl>
|
||||
<tags>dns</tags>
|
||||
<summary>Synchronize your DNS to multiple providers from a simple DSL</summary>
|
||||
<description>This package simply installs the dnscontrol tool on your system</description>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="dnscontrol.exe" target="tools" />
|
||||
<!--Building from Linux? You may need this instead: <file src="tools/**" target="tools" />-->
|
||||
</files>
|
||||
</package>
|
||||
|
|
Loading…
Add table
Reference in a new issue