Add a 'version' subcommand to suikactl, show version on suika daemon
startup. Signed-off-by: Aoi K <koizumi.aoi@chaotic.ninja> git-svn-id: file:///srv/svn/repo/suika/trunk@810 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This commit is contained in:
parent
41abaffd5e
commit
f8789c45a1
@ -33,3 +33,4 @@ AGPLv3, see LICENSE.
|
||||
Copyright (C) 2020 The soju Contributors
|
||||
Copyright (C) 2023-present Aoi K.
|
||||
|
||||
The code for `version.go` is stolen verbatim from one of [@prologic](https://git.mills.io/prologic)'s projects. It's probably under MIT
|
||||
|
@ -311,7 +311,8 @@ func main() {
|
||||
default:
|
||||
log.Fatalf("failed to listen on %q: unsupported scheme", listen)
|
||||
}
|
||||
|
||||
|
||||
log.Printf("starting suika version %v\n", suika.FullVersion())
|
||||
log.Printf("server listening on %q", listen)
|
||||
}
|
||||
|
||||
|
@ -107,6 +107,8 @@ func main() {
|
||||
if err := db.StoreUser(ctx, user); err != nil {
|
||||
log.Fatalf("failed to update password: %v", err)
|
||||
}
|
||||
case "version":
|
||||
fmt.Printf("%v\n", suika.FullVersion())
|
||||
default:
|
||||
flag.Usage()
|
||||
if cmd != "help" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user