dnscontrol/main.go

37 lines
1.1 KiB
Go
Raw Normal View History

2016-08-23 08:31:50 +08:00
package main
import (
"fmt"
"log"
"os"
"runtime/debug"
2016-08-23 08:31:50 +08:00
"github.com/StackExchange/dnscontrol/v3/commands"
"github.com/StackExchange/dnscontrol/v3/pkg/version"
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
2016-08-23 08:31:50 +08:00
)
//go:generate go run build/generate/generate.go build/generate/featureMatrix.go
2016-08-23 08:31:50 +08:00
2020-10-13 00:54:40 +08:00
// Version management. Goals:
// 1. Someone who just does "go get" has at least some information.
// 2. If built with build/build.go, more specific build information gets put in.
// Update the number here manually each release, so at least we have a range for go-get people.
var (
SHA = ""
2020-12-07 22:22:09 +08:00
Version = "3.5.0"
2020-10-13 00:54:40 +08:00
BuildTime = ""
)
2016-08-23 08:31:50 +08:00
func main() {
2020-10-13 00:54:40 +08:00
version.SHA = SHA
version.Semver = Version
2020-10-13 00:54:40 +08:00
version.BuildTime = BuildTime
2016-08-23 08:31:50 +08:00
log.SetFlags(log.LstdFlags | log.Lshortfile)
if info, ok := debug.ReadBuildInfo(); !ok && info == nil {
fmt.Fprint(os.Stderr, "Warning: dnscontrol was built without Go modules. See https://github.com/StackExchange/dnscontrol#from-source for more information on how to build dnscontrol correctly.\n\n")
}
os.Exit(commands.Run("dnscontrol " + version.Banner()))
2016-08-23 08:31:50 +08:00
}