1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

32 lines
965 B
Go
Raw Normal View History

2016-08-22 18:31:50 -06:00
package main
import (
"fmt"
"os"
"runtime/debug"
2016-08-22 18:31:50 -06:00
2023-05-20 19:21:45 +02:00
"github.com/StackExchange/dnscontrol/v4/commands"
_ "github.com/StackExchange/dnscontrol/v4/providers/_all"
"github.com/fatih/color"
2016-08-22 18:31:50 -06:00
)
//go:generate go run build/generate/generate.go build/generate/featureMatrix.go build/generate/functionTypes.go build/generate/dtsFile.go
2016-08-22 18:31:50 -06:00
2020-10-12 12:54:40 -04: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.
2024-01-04 16:46:36 +01:00
// GoReleaser: version
2020-10-12 12:54:40 -04:00
var (
2024-01-04 16:46:36 +01:00
version = "dev"
2020-10-12 12:54:40 -04:00
)
2016-08-22 18:31:50 -06:00
func main() {
if os.Getenv("CI") == "true" {
color.NoColor = false
}
if info, ok := debug.ReadBuildInfo(); !ok && info == nil {
fmt.Fprint(os.Stderr, "Warning: dnscontrol was built without Go modules. See https://docs.dnscontrol.org/getting-started/getting-started#source for more information on how to build dnscontrol correctly.\n\n")
}
os.Exit(commands.Run("DNSControl version " + version))
2016-08-22 18:31:50 -06:00
}