mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-15 01:53:09 -06:00
Add commit hash to routing version API, TODO placeholder
Signed-off-by: Brian Meek <brian@hntlabs.com>
This commit is contained in:
parent
f681e54bef
commit
b95657fe94
|
|
@ -7,7 +7,7 @@ WORKDIR /build
|
||||||
COPY . /build
|
COPY . /build
|
||||||
|
|
||||||
RUN mkdir -p bin
|
RUN mkdir -p bin
|
||||||
RUN go build -ldflags="-X 'routing.CommitHash=`git rev-list -1 HEAD`'" -trimpath -o bin/ ./cmd/dendrite-monolith-server
|
RUN go build -trimpath -o bin/ ./cmd/dendrite-monolith-server
|
||||||
RUN go build -trimpath -o bin/ ./cmd/create-account
|
RUN go build -trimpath -o bin/ ./cmd/create-account
|
||||||
RUN go build -trimpath -o bin/ ./cmd/generate-keys
|
RUN go build -trimpath -o bin/ ./cmd/generate-keys
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,6 @@ import (
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Added in build script Cokerfile.monolith
|
|
||||||
var CommitHash string
|
|
||||||
|
|
||||||
// Setup registers HTTP handlers with the given ServeMux. It also supplies the given http.Client
|
// Setup registers HTTP handlers with the given ServeMux. It also supplies the given http.Client
|
||||||
// to clients which need to make outbound HTTP requests.
|
// to clients which need to make outbound HTTP requests.
|
||||||
//
|
//
|
||||||
|
|
@ -104,7 +101,7 @@ func Setup(
|
||||||
JSON: struct {
|
JSON: struct {
|
||||||
Versions []string `json:"versions"`
|
Versions []string `json:"versions"`
|
||||||
UnstableFeatures map[string]bool `json:"unstable_features"`
|
UnstableFeatures map[string]bool `json:"unstable_features"`
|
||||||
CommitHash string `json:"commit_hash"`
|
BuildVersion string `json:"build_version"`
|
||||||
}{Versions: []string{
|
}{Versions: []string{
|
||||||
"r0.0.1",
|
"r0.0.1",
|
||||||
"r0.1.0",
|
"r0.1.0",
|
||||||
|
|
@ -116,7 +113,7 @@ func Setup(
|
||||||
"v1.0",
|
"v1.0",
|
||||||
"v1.1",
|
"v1.1",
|
||||||
"v1.2",
|
"v1.2",
|
||||||
}, UnstableFeatures: unstableFeatures, CommitHash: CommitHash},
|
}, UnstableFeatures: unstableFeatures, BuildVersion: "TODO"},
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
).Methods(http.MethodGet, http.MethodOptions)
|
).Methods(http.MethodGet, http.MethodOptions)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue