chore: add goreleaser

This commit is contained in:
soulteary 2023-01-10 00:04:46 +08:00
parent 6c8316730c
commit 9e754e8664
No known key found for this signature in database
GPG key ID: 8107DBA6BC84D986
3 changed files with 125 additions and 6 deletions

View file

@ -21,16 +21,13 @@ import (
"github.com/adnanh/webhook/internal/middleware"
"github.com/adnanh/webhook/internal/pidfile"
"github.com/adnanh/webhook/internal/platform"
"github.com/adnanh/webhook/internal/version"
chimiddleware "github.com/go-chi/chi/middleware"
"github.com/gorilla/mux"
fsnotify "gopkg.in/fsnotify.v1"
)
const (
version = "2.8.0"
)
var (
ip = flag.String("ip", "0.0.0.0", "ip the webhook should serve hooks on")
port = flag.Int("port", 9000, "port the webhook should serve hooks on")
@ -105,7 +102,7 @@ func main() {
flag.Parse()
if *justDisplayVersion {
fmt.Println("webhook version " + version)
fmt.Println("webhook version " + version.Version)
os.Exit(0)
}
@ -196,7 +193,7 @@ func main() {
}()
}
log.Println("version " + version + " starting")
log.Println("version " + version.Version + " starting")
// set os signal watcher
platform.SetupSignals(signals, reloadAllHooks, pidFile)