Skip to content

Commit 78dfed0

Browse files
author
xen-git
committed
Merge commit '5b56a83a359973db861b4006d7510f2efb75b87d'
2 parents bcc5694 + 5b56a83 commit 78dfed0

File tree

8 files changed

+25
-10
lines changed

8 files changed

+25
-10
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,17 @@ api-libs-doc:
7878
.PHONY: version
7979
version:
8080
@printf "(* This file is autogenerated. Grep for e17512ce-ba7c-11df-887b-0026b9799147 (random uuid) to see where it comes from. ;o) *) \n \
81-
let hg_id = \"$(shell git show-ref --head | grep -E ' HEAD$$' | cut -f 1 -d ' ')\" \n \
81+
let git_id = \"$(shell git show-ref --head | grep -E ' HEAD$$' | cut -f 1 -d ' ')\" \n \
8282
let hostname = \"$(shell hostname)\" \n \
8383
let date = \"$(shell date -u +%Y-%m-%d)\" \n \
8484
let product_version = \"$(PRODUCT_VERSION)\" \n \
8585
let product_version_text = \"$(PRODUCT_VERSION_TEXT)\" \n \
8686
let product_version_text_short = \"$(PRODUCT_VERSION_TEXT_SHORT)\" \n \
8787
let platform_version = Util_inventory.lookup ~default:\"\" \"PLATFORM_VERSION\" \n \
8888
let product_brand = \"$(PRODUCT_BRAND)\" \n \
89-
let build_number = Util_inventory.lookup ~default:\"$(BUILD_NUMBER)\" \"BUILD_NUMBER\" \n" \
89+
let build_number = Util_inventory.lookup ~default:\"$(BUILD_NUMBER)\" \"BUILD_NUMBER\" \n \
90+
let xapi_version_major = $(shell cut -d. -f1 VERSION) \n \
91+
let xapi_version_minor = $(shell cut -d. -f2 VERSION) \n" \
9092
> ocaml/util/version.ml
9193

9294
.PHONY: clean

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.3

git-tag-version.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Tag the master and debian branch HEADs with the version in ./VERSION,
4+
# according to format specified in ./debian/gbp.conf
5+
6+
VERSION=$(cat VERSION | tr -d '\n')
7+
8+
# Retag master and debian
9+
git tag -f -a master/${VERSION} master -m "Tagged master branch with version $version"
10+
#git tag -f -a debian/${VERSION} debian -m "Tagged debian branch with version $version"

ocaml/util/version.mli

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
val hg_id : string
1+
val git_id : string
22
val hostname : string
33
val date : string
44
val product_version : string
@@ -7,3 +7,5 @@ val product_version_text_short : string
77
val platform_version: string
88
val product_brand : string
99
val build_number : string
10+
val xapi_version_major : int
11+
val xapi_version_minor : int

ocaml/xapi/xapi.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ let daemonize = ref false
226226

227227
let show_version () =
228228
List.iter (fun (x, y) -> printf "%s=%s\n" x y)
229-
[ "hg_id", Version.hg_id;
229+
[ "git_id", Version.git_id;
230230
"hostname", Version.hostname;
231231
"date", Version.date;
232232
"PRODUCT_VERSION", Version.product_version;

ocaml/xapi/xapi_config.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,6 @@ let dump_config () =
116116
debug "product_version: %s" Version.product_version;
117117
debug "product_brand: %s" Version.product_brand;
118118
debug "build_number: %s" Version.build_number;
119-
debug "hg changeset: %s" Version.hg_id;
119+
debug "git changeset: %s" Version.git_id;
120120
debug "version: %d.%d" version_major version_minor;
121121
(* debug "License filename: %s" !License_file.filename *)

ocaml/xapi/xapi_globs.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ let pool_secret = ref ""
2727
let localhost_ref : [`host] Ref.t ref = ref Ref.null
2828

2929
(* xapi version *)
30-
let version_major = 1
31-
let version_minor = 3
30+
let version_major = Version.xapi_version_major
31+
let version_minor = Version.xapi_version_minor
3232
let xapi_user_agent = "xapi/"^(string_of_int version_major)^"."^(string_of_int version_minor)
3333

3434
(* api version *)
@@ -123,7 +123,7 @@ let _product_version_text_short = "product_version_text_short"
123123
let _platform_version = "platform_version"
124124
let _product_brand = "product_brand"
125125
let _build_number = "build_number"
126-
let _hg_id = "hg_id"
126+
let _git_id = "git_id"
127127
let _api_major = "API_major"
128128
let _api_minor = "API_minor"
129129
let _api_vendor = "API_vendor"
@@ -145,7 +145,7 @@ let software_version = [ _product_version, Version.product_version;
145145
_platform_version, Version.platform_version;
146146
_product_brand, Version.product_brand;
147147
_build_number, Version.build_number;
148-
_hg_id, Version.hg_id;
148+
_git_id, Version.git_id;
149149
_hostname, Version.hostname;
150150
_date, Version.date]
151151

ocaml/xapi/xapi_pool.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ let pre_join_checks ~__context ~rpc ~session_id ~force =
188188
begin try List.assoc "product_version" fields with _ -> "" end,
189189
begin try List.assoc "product_brand" fields with _ -> "" end,
190190
begin try List.assoc "build_number" fields with _ -> "" end,
191-
begin try List.assoc "hg_id" fields with _ -> "" end,
191+
begin try List.assoc "git_id" fields with _ -> "" end,
192192
begin try
193193
if List.mem_assoc Xapi_globs.linux_pack_vsn_key fields then "installed"
194194
else "not present"

0 commit comments

Comments
 (0)