Set correct versioning for CoreDNS (#225)

This needs a patch in caddy to work properly, but we want something like
it anyway.

See https://github.com/mholt/caddy/pull/1058
This commit is contained in:
Miek Gieben
2016-08-21 10:27:07 +01:00
committed by GitHub
parent 416603383d
commit 0be3fb4947

View File

@@ -10,15 +10,22 @@ import (
//go:generate go run plugin_generate.go
func main() {
// Default values for flags for CoreDNS.
flag.Set("type", "dns")
// Values specific for CoreDNS.
caddy.DefaultConfigFile = "Corefile"
caddy.AppName = "coredns"
caddy.AppVersion = version
setFlag()
setName()
caddymain.Run()
}
// setFlag sets flags to predefined values for CoreDNS.
func setFlag() {
flag.Set("type", "dns")
}
// setName sets application name and versioning information for CoreDNS.
func setName() {
caddy.DefaultConfigFile = "Corefile"
caddy.AppName = "CoreDNS"
caddy.AppVersion = version
}
const version = "001"