File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ RUN go mod download
99
1010COPY . .
1111RUN go build -a -ldflags "-w -s \
12- -X github.com/voidcontests/api/internal/version.GIT_COMMIT =$(git rev-parse --short HEAD) \
13- -X github.com/voidcontests/api/internal/version.GIT_BRANCH =$(git rev-parse --abbrev-ref HEAD)" \
12+ -X github.com/voidcontests/api/internal/version.Commit =$(git rev-parse --short HEAD) \
13+ -X github.com/voidcontests/api/internal/version.Branch =$(git rev-parse --abbrev-ref HEAD)" \
1414 -o build/api ./cmd/api
1515
1616# lightweight docker container with binaries only
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ package version
22
33import "log/slog"
44
5- var GIT_COMMIT string
6- var GIT_BRANCH string
5+ var Commit string
6+ var Branch string
77
8- var CommitAttr = slog.Attr {Key : "commit" , Value : slog .StringValue (GIT_COMMIT )}
9- var BranchAttr = slog.Attr {Key : "branch" , Value : slog .StringValue (GIT_BRANCH )}
8+ var CommitAttr = slog.Attr {Key : "commit" , Value : slog .StringValue (Commit )}
9+ var BranchAttr = slog.Attr {Key : "branch" , Value : slog .StringValue (Branch )}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import (
1212
1313func Completed (next echo.HandlerFunc ) echo.HandlerFunc {
1414 return func (c echo.Context ) error {
15- if c .Request ().Method == "OPTIONS" {
15+ if c .Request ().Method == "OPTIONS" || c . Path () == "/api/healthcheck" {
1616 return next (c )
1717 }
1818
You can’t perform that action at this time.
0 commit comments