Version imprint (#1383)

* Versions

* Update build.sh
This commit is contained in:
Neil Alexander 2020-09-02 16:18:08 +01:00 committed by GitHub
parent 096191ca24
commit 3b0774805c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 3 deletions

View file

@ -17,6 +17,7 @@ package routing
import (
"net/http"
"github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/util"
)
@ -31,5 +32,13 @@ type server struct {
// Version returns the server version
func Version() util.JSONResponse {
return util.JSONResponse{Code: http.StatusOK, JSON: &version{server{"dev", "Dendrite"}}}
return util.JSONResponse{
Code: http.StatusOK,
JSON: &version{
server{
Name: "Dendrite",
Version: internal.VersionString(),
},
},
}
}