Permalink
Browse files

Merge commit '5b56a83a359973db861b4006d7510f2efb75b87d'

  • Loading branch information...
xen-git
xen-git committed Nov 29, 2011
2 parents bcc5694 + 5b56a83 commit 78dfed024452603b807645df9ab3d9b8663554cc
Showing with 25 additions and 10 deletions.
  1. +4 −2 Makefile
  2. +1 −0 VERSION
  3. +10 −0 git-tag-version.sh
  4. +3 −1 ocaml/util/version.mli
  5. +1 −1 ocaml/xapi/xapi.ml
  6. +1 −1 ocaml/xapi/xapi_config.ml
  7. +4 −4 ocaml/xapi/xapi_globs.ml
  8. +1 −1 ocaml/xapi/xapi_pool.ml
View
@@ -78,15 +78,17 @@ api-libs-doc:
.PHONY: version
version:
@printf "(* This file is autogenerated. Grep for e17512ce-ba7c-11df-887b-0026b9799147 (random uuid) to see where it comes from. ;o) *) \n \
- let hg_id = \"$(shell git show-ref --head | grep -E ' HEAD$$' | cut -f 1 -d ' ')\" \n \
+ let git_id = \"$(shell git show-ref --head | grep -E ' HEAD$$' | cut -f 1 -d ' ')\" \n \
let hostname = \"$(shell hostname)\" \n \
let date = \"$(shell date -u +%Y-%m-%d)\" \n \
let product_version = \"$(PRODUCT_VERSION)\" \n \
let product_version_text = \"$(PRODUCT_VERSION_TEXT)\" \n \
let product_version_text_short = \"$(PRODUCT_VERSION_TEXT_SHORT)\" \n \
let platform_version = Util_inventory.lookup ~default:\"\" \"PLATFORM_VERSION\" \n \
let product_brand = \"$(PRODUCT_BRAND)\" \n \
- let build_number = Util_inventory.lookup ~default:\"$(BUILD_NUMBER)\" \"BUILD_NUMBER\" \n" \
+ let build_number = Util_inventory.lookup ~default:\"$(BUILD_NUMBER)\" \"BUILD_NUMBER\" \n \
+ let xapi_version_major = $(shell cut -d. -f1 VERSION) \n \
+ let xapi_version_minor = $(shell cut -d. -f2 VERSION) \n" \
> ocaml/util/version.ml
.PHONY: clean
View
@@ -0,0 +1 @@
+1.3
View
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# Tag the master and debian branch HEADs with the version in ./VERSION,
+# according to format specified in ./debian/gbp.conf
+
+VERSION=$(cat VERSION | tr -d '\n')
+
+# Retag master and debian
+git tag -f -a master/${VERSION} master -m "Tagged master branch with version $version"
+#git tag -f -a debian/${VERSION} debian -m "Tagged debian branch with version $version"
View
@@ -1,4 +1,4 @@
-val hg_id : string
+val git_id : string
val hostname : string
val date : string
val product_version : string
@@ -7,3 +7,5 @@ val product_version_text_short : string
val platform_version: string
val product_brand : string
val build_number : string
+val xapi_version_major : int
+val xapi_version_minor : int
View
@@ -226,7 +226,7 @@ let daemonize = ref false
let show_version () =
List.iter (fun (x, y) -> printf "%s=%s\n" x y)
- [ "hg_id", Version.hg_id;
+ [ "git_id", Version.git_id;
"hostname", Version.hostname;
"date", Version.date;
"PRODUCT_VERSION", Version.product_version;
@@ -116,6 +116,6 @@ let dump_config () =
debug "product_version: %s" Version.product_version;
debug "product_brand: %s" Version.product_brand;
debug "build_number: %s" Version.build_number;
- debug "hg changeset: %s" Version.hg_id;
+ debug "git changeset: %s" Version.git_id;
debug "version: %d.%d" version_major version_minor;
(* debug "License filename: %s" !License_file.filename *)
View
@@ -27,8 +27,8 @@ let pool_secret = ref ""
let localhost_ref : [`host] Ref.t ref = ref Ref.null
(* xapi version *)
-let version_major = 1
-let version_minor = 3
+let version_major = Version.xapi_version_major
+let version_minor = Version.xapi_version_minor
let xapi_user_agent = "xapi/"^(string_of_int version_major)^"."^(string_of_int version_minor)
(* api version *)
@@ -123,7 +123,7 @@ let _product_version_text_short = "product_version_text_short"
let _platform_version = "platform_version"
let _product_brand = "product_brand"
let _build_number = "build_number"
-let _hg_id = "hg_id"
+let _git_id = "git_id"
let _api_major = "API_major"
let _api_minor = "API_minor"
let _api_vendor = "API_vendor"
@@ -145,7 +145,7 @@ let software_version = [ _product_version, Version.product_version;
_platform_version, Version.platform_version;
_product_brand, Version.product_brand;
_build_number, Version.build_number;
- _hg_id, Version.hg_id;
+ _git_id, Version.git_id;
_hostname, Version.hostname;
_date, Version.date]
View
@@ -188,7 +188,7 @@ let pre_join_checks ~__context ~rpc ~session_id ~force =
begin try List.assoc "product_version" fields with _ -> "" end,
begin try List.assoc "product_brand" fields with _ -> "" end,
begin try List.assoc "build_number" fields with _ -> "" end,
- begin try List.assoc "hg_id" fields with _ -> "" end,
+ begin try List.assoc "git_id" fields with _ -> "" end,
begin try
if List.mem_assoc Xapi_globs.linux_pack_vsn_key fields then "installed"
else "not present"

0 comments on commit 78dfed0

Please sign in to comment.