CI revamp part 2 (#1875)

* Added Makefile
* Updated README with the new information
* Updated Github Actions
* Added FreeBSD ARM builds
* Prepared to our internal CI
* Improved the auto-update version check
This commit is contained in:
Andrey Meshkov
2020-07-09 19:54:53 +03:00
committed by GitHub
parent ff23d7b6d7
commit 632a47d56f
11 changed files with 472 additions and 313 deletions

View File

@@ -134,6 +134,15 @@ func Main(version string, channel string, armVer string) {
run(args)
}
// version - returns the current version string
func version() string {
msg := "AdGuard Home, version %s, channel %s, arch %s %s"
if ARMVersion != "" {
msg = msg + " v" + ARMVersion
}
return fmt.Sprintf(msg, versionString, updateChannel, runtime.GOOS, runtime.GOARCH)
}
// run initializes configuration and runs the AdGuard Home
// run is a blocking method!
// nolint
@@ -153,11 +162,7 @@ func run(args options) {
configureLogger(args)
// print the first message after logger is configured
msg := "AdGuard Home, version %s, channel %s, arch %s %s"
if ARMVersion != "" {
msg = msg + " v" + ARMVersion
}
log.Printf(msg, versionString, updateChannel, runtime.GOOS, runtime.GOARCH)
log.Println(version())
log.Debug("Current working directory is %s", Context.workDir)
if args.runningAsService {
log.Info("AdGuard Home is running as a service")
@@ -564,7 +569,7 @@ func loadOptions() options {
{"verbose", "v", "Enable verbose output", nil, func() { o.verbose = true }},
{"glinet", "", "Run in GL-Inet compatibility mode", nil, func() { o.glinetMode = true }},
{"version", "", "Show the version and exit", nil, func() {
fmt.Printf("AdGuardHome %s\n", versionString)
fmt.Println(version())
os.Exit(0)
}},
{"help", "", "Print this help", nil, func() {