From: David Scott Date: Tue, 12 Oct 2010 09:53:03 +0000 (+0100) Subject: CP-1914: Record some extra build-time information in Host.software_version ("product_... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1e386b4f81ffb93a6f5a0d8002e95402492c9c89;p=xcp%2Fxen-api.git CP-1914: Record some extra build-time information in Host.software_version ("product_version_text" and "product_version_text_short" -- useful for UIs to display rather than raw version numbers) Signed-off-by: David Scott --- diff --git a/Makefile b/Makefile index 749d870f..d4cbefdf 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,8 @@ version: echo "let hostname = \"$(shell hostname)\"" >> ocaml/util/version.ml echo "let date = \"$(shell date -u +%Y-%m-%d)\"" >> ocaml/util/version.ml echo "let product_version = \"$(PRODUCT_VERSION)\"" >> ocaml/util/version.ml + echo "let product_version_text = \"$(PRODUCT_VERSION_TEXT)\"" >> ocaml/util/version.ml + echo "let product_version_text_short = \"$(PRODUCT_VERSION_TEXT_SHORT)\"" >> ocaml/util/version.ml echo "let product_brand = \"$(PRODUCT_BRAND)\"" >> ocaml/util/version.ml echo "let build_number = Util_inventory.lookup \"BUILD_NUMBER\" (* \"$(BUILD_NUMBER)\" *)" >> ocaml/util/version.ml diff --git a/ocaml/util/version.mli b/ocaml/util/version.mli index 3a5ef6e4..ea7db2c6 100644 --- a/ocaml/util/version.mli +++ b/ocaml/util/version.mli @@ -2,5 +2,7 @@ val hg_id : string val hostname : string val date : string val product_version : string +val product_version_text : string +val product_version_text_short : string val product_brand : string val build_number : string diff --git a/ocaml/xapi/xapi_globs.ml b/ocaml/xapi/xapi_globs.ml index ced62435..593fdad8 100644 --- a/ocaml/xapi/xapi_globs.ml +++ b/ocaml/xapi/xapi_globs.ml @@ -114,6 +114,8 @@ let hg_changeset = ref "unknown" let _hostname = "hostname" let _date = "date" let _product_version = "product_version" +let _product_version_text = "product_version_text" +let _product_version_text_short = "product_version_text_short" let _product_brand = "product_brand" let _build_number = "build_number" let _hg_id = "hg_id" @@ -133,6 +135,8 @@ let _dbv = "dbv" let export_vsn = 2 let software_version = [ _product_version, Version.product_version; + _product_version_text, Version.product_version_text; + _product_version_text_short, Version.product_version_text_short; _product_brand, Version.product_brand; _build_number, Version.build_number; _hg_id, Version.hg_id;