Show fission deployment version with cli (#538)
Add version information to binary through go ldflags
This commit is contained in:
@@ -33,6 +33,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/dchest/uniuri"
|
||||
|
||||
"github.com/fission/fission"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -68,6 +70,11 @@ func MakeBuilder(sharedVolumePath string) *Builder {
|
||||
}
|
||||
}
|
||||
|
||||
func (builder *Builder) VersionHandler(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
fmt.Fprintf(w, fission.VersionInfo().String())
|
||||
}
|
||||
|
||||
func (builder *Builder) Handler(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != "POST" {
|
||||
e := fmt.Sprintf("Method not allowed: %v", r.Method)
|
||||
|
||||
Reference in New Issue
Block a user