1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-31 10:39:23 +02:00

Makefile, Dockerfile, GoReleaser, config.yml, systemd service

This commit is contained in:
Philipp Heckel 2021-10-23 21:29:45 -04:00
parent a66bd6dad7
commit e1c9fef6dc
16 changed files with 512 additions and 68 deletions

29
main.go
View file

@ -1,13 +1,32 @@
package main
import (
"heckel.io/notifyme/server"
"log"
"fmt"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/cmd"
"os"
"runtime"
)
var (
version = "dev"
commit = "unknown"
date = "unknown"
)
func main() {
s := server.New()
if err := s.Run(); err != nil {
log.Fatalln(err)
cli.AppHelpTemplate += fmt.Sprintf(`
Try 'ntfy COMMAND --help' for more information.
ntfy %s (%s), runtime %s, built at %s
Copyright (C) 2021 Philipp C. Heckel, distributed under the Apache License 2.0
`, 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)
}
}