After discovering the full path using the go nm tool, properly set the ReleaseVersion in the clientapi router

Signed-off-by: Brian Meek <brian@hntlabs.com>
This commit is contained in:
Brian Meek 2022-09-17 14:10:36 -07:00 committed by Tak Wai Wong
parent 93ea0f5864
commit 68d9300ec0
No known key found for this signature in database
GPG key ID: 222E4AF2AA1F467D
2 changed files with 6 additions and 1 deletions

View file

@ -9,7 +9,7 @@ WORKDIR /build
COPY . /build
RUN mkdir -p bin
RUN go build -trimpath -o bin/ -ldflags="-X routing.ReleaseVersion=$RELEASE_VERSION" ./cmd/dendrite-monolith-server
RUN go build -trimpath -o bin/ -ldflags="-X 'github.com/matrix-org/dendrite/clientapi/routing.ReleaseVersion=$RELEASE_VERSION'" ./cmd/dendrite-monolith-server
RUN go build -trimpath -o bin/ ./cmd/create-account
RUN go build -trimpath -o bin/ ./cmd/generate-keys

View file

@ -65,6 +65,11 @@ func Setup(
extRoomsProvider api.ExtraPublicRoomsProvider,
mscCfg *config.MSCs, natsClient *nats.Conn,
) {
logrus.WithFields(logrus.Fields{
"ReleaseVersion": ReleaseVersion,
}).Info("Started clientAPI router with ReleaseVersion")
prometheus.MustRegister(amtRegUsers, sendEventDuration)
rateLimits := httputil.NewRateLimits(&cfg.RateLimiting)