2021-10-22 22:54:02 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2021-10-24 01:29:45 +00:00
|
|
|
"fmt"
|
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
"heckel.io/ntfy/cmd"
|
|
|
|
"os"
|
|
|
|
"runtime"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
version = "dev"
|
|
|
|
commit = "unknown"
|
|
|
|
date = "unknown"
|
2021-10-22 22:54:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2021-10-24 01:29:45 +00:00
|
|
|
cli.AppHelpTemplate += fmt.Sprintf(`
|
2021-12-19 23:32:16 +00:00
|
|
|
Try 'ntfy COMMAND --help' or https://ntfy.sh/docs/ for more information.
|
|
|
|
|
|
|
|
To report a bug, open an issue on GitHub: https://github.com/binwiederhier/ntfy/issues.
|
2022-03-16 18:50:00 +00:00
|
|
|
If you want to chat, simply join the Discord server (https://discord.gg/cT7ECsZj9w), or
|
|
|
|
the Matrix room (https://matrix.to/#/#ntfy:matrix.org).
|
2021-10-24 01:29:45 +00:00
|
|
|
|
|
|
|
ntfy %s (%s), runtime %s, built at %s
|
2022-03-16 18:50:00 +00:00
|
|
|
Copyright (C) 2022 Philipp C. Heckel, licensed under Apache License 2.0 & GPLv2
|
2021-10-24 01:29:45 +00:00
|
|
|
`, version, commit[:7], runtime.Version(), date)
|
|
|
|
|
|
|
|
app := cmd.New()
|
|
|
|
app.Version = version
|
|
|
|
|
|
|
|
if err := app.Run(os.Args); err != nil {
|
|
|
|
fmt.Fprintln(os.Stderr, err.Error())
|
|
|
|
os.Exit(1)
|
2021-10-22 22:54:02 +00:00
|
|
|
}
|
|
|
|
}
|