dnscontrol/main.go
Chris Hunt cfc82c8e13
DOCS: Update with new release process (#1707)
* Update with new release process

* Move major bump to its own section; split step 1 into 2 parts

* Remove version number from main.go

* Linting

* Add example `git tag` command

* Try a different regex pattern for release note generation

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-08-15 10:41:45 -04:00

36 lines
1,004 B
Go

package main
import (
"fmt"
"log"
"os"
"runtime/debug"
"github.com/StackExchange/dnscontrol/v3/commands"
"github.com/StackExchange/dnscontrol/v3/pkg/version"
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
)
//go:generate go run build/generate/generate.go build/generate/featureMatrix.go
// 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.
var (
SHA = ""
Version = ""
BuildTime = ""
)
func main() {
version.SHA = SHA
version.Semver = Version
version.BuildTime = BuildTime
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()))
}