all repos — website @ b27825139e77cd8c527ada7c712f186c94444c04

My website

brand exe with both long and short commit hashes

Alan Pearce
commit

b27825139e77cd8c527ada7c712f186c94444c04

parent

ac9646a38aaa39ca9cb7e0aa2efa370e463abaa0

1 file changed, 2 insertions(+), 4 deletions(-)

changed files
M cmd/server/server.gocmd/server/server.go
@@ -19,8 +19,6 @@ sentryhttp "github.com/getsentry/sentry-go/http"
"github.com/shengyanli1982/law" ) -var Commit string - var config *cfg.Config type HTTPError struct {
@@ -71,7 +69,7 @@ w.WriteHeader(http.StatusInternalServerError)
slog.Error("runtime panic!", "error", fail) } }() - w.Header().Set("Server", fmt.Sprintf("website (%s)", Commit)) + w.Header().Set("Server", fmt.Sprintf("website (%s)", ShortSHA)) if err := fn(w, r); err != nil { if strings.Contains(r.Header.Get("Accept"), "text/html") { w.WriteHeader(err.Code)
@@ -119,7 +117,7 @@ err = sentry.Init(sentry.ClientOptions{
EnableTracing: true, TracesSampleRate: 1.0, Dsn: os.Getenv("SENTRY_DSN"), - Release: Commit, + Release: CommitSHA, Environment: env, }) if err != nil {