use same version var on cli app as header

This commit is contained in:
6543 2023-02-10 04:33:28 +01:00
parent 7b35a192bf
commit 1b6ea4b6e1
No known key found for this signature in database
GPG key ID: B8BE6D610E61C862

View file

@ -8,15 +8,13 @@ import (
"github.com/urfave/cli/v2"
"codeberg.org/codeberg/pages/cmd"
"codeberg.org/codeberg/pages/server/version"
)
// can be changed with -X on compile
var version = "dev"
func main() {
app := cli.NewApp()
app.Name = "pages-server"
app.Version = version
app.Version = version.Version
app.Usage = "pages server"
app.Action = cmd.Serve
app.Flags = cmd.ServerFlags