Fix default config and version
This commit is contained in:
parent
f1018dce47
commit
45aea93e6b
7 changed files with 30 additions and 30 deletions
|
|
@ -3,13 +3,13 @@ package app
|
|||
import (
|
||||
"os"
|
||||
|
||||
ooni "github.com/ooni/probe-cli"
|
||||
"github.com/ooni/probe-cli/internal/cli/root"
|
||||
"github.com/ooni/probe-cli/internal/cli/version"
|
||||
)
|
||||
|
||||
// Run the app. This is the main app entry point
|
||||
func Run() error {
|
||||
root.Cmd.Version(version.Version)
|
||||
root.Cmd.Version(ooni.Version)
|
||||
_, err := root.Cmd.Parse(os.Args[1:])
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import (
|
|||
"github.com/ooni/probe-cli/internal/log/handlers/batch"
|
||||
"github.com/ooni/probe-cli/internal/log/handlers/cli"
|
||||
"github.com/ooni/probe-cli/utils"
|
||||
"github.com/ooni/probe-cli/internal/cli/version/version.go"
|
||||
)
|
||||
|
||||
// Cmd is the root command
|
||||
|
|
@ -33,7 +32,7 @@ func init() {
|
|||
}
|
||||
if *isVerbose {
|
||||
log.SetLevel(log.DebugLevel)
|
||||
log.Debugf("ooni version %s", version.Version)
|
||||
log.Debugf("ooni version %s", ooni.Version)
|
||||
}
|
||||
|
||||
Init = func() (*ooni.Context, error) {
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/alecthomas/kingpin"
|
||||
ooni "github.com/ooni/probe-cli"
|
||||
"github.com/ooni/probe-cli/internal/cli/root"
|
||||
)
|
||||
|
||||
const Version = "3.0.0-dev.0"
|
||||
|
||||
func init() {
|
||||
cmd := root.Command("version", "Show version.")
|
||||
cmd.Action(func(_ *kingpin.ParseContext) error {
|
||||
fmt.Println(Version)
|
||||
fmt.Println(ooni.Version)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue