diff --git a/Dockerfile b/Dockerfile index 97ee8aa..253dd43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /app ADD . /app/ -RUN go build -ldflags "-s -w -extldflags '-static'" -o /main ./cmd/${GO_CMD}/ +RUN go build -ldflags "-X main.release=$(git rev-parse --short HEAD) -s -w -extldflags '-static'" -o /main ./cmd/${GO_CMD}/ FROM scratch COPY --chown=65534:0 --from=builder /main / diff --git a/cmd/dealsbot/main.go b/cmd/dealsbot/main.go index 168257e..50af72c 100644 --- a/cmd/dealsbot/main.go +++ b/cmd/dealsbot/main.go @@ -26,6 +26,9 @@ var ( webhookToken = os.Getenv("webhook_token") ) +// sentry +var release string + func main() { // query different sources store to db // try to incorporate operagx apiUrl: @@ -38,11 +41,13 @@ func main() { // - check ubisoft works err := sentry.Init(sentry.ClientOptions{ + // Either set your DSN here or set the SENTRY_DSN environment variable. Dsn: "https://0282823b5ee14546a4c154c129109a31@sentry.rvo.one/2", // Set TracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production, TracesSampleRate: 1.0, + Release: release, }) if err != nil { log.Fatalf("sentry.Init: %s", err)