mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
feat(server): export ReleaseVersion
releaseVersion is needed in etcd.go to print it out in the -version flag.
This commit is contained in:
@@ -195,7 +195,7 @@ func (s *Server) OriginAllowed(origin string) bool {
|
||||
// Handler to return the current version of etcd.
|
||||
func (s *Server) GetVersionHandler(w http.ResponseWriter, req *http.Request) error {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
fmt.Fprintf(w, "etcd %s", releaseVersion)
|
||||
fmt.Fprintf(w, "etcd %s", ReleaseVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -5,4 +5,4 @@ const Version = "v2"
|
||||
// TODO: The release version (generated from the git tag) will be the raft
|
||||
// protocol version for now. When things settle down we will fix it like the
|
||||
// client API above.
|
||||
const PeerVersion = releaseVersion
|
||||
const PeerVersion = ReleaseVersion
|
||||
|
||||
Reference in New Issue
Block a user