Skip to content

Commit e9c2e9e

Browse files
Young Kimfacebook-github-bot
authored andcommitted
[hack] Add structured json to hh --json
Summary: Referred to diffusion/FBS/browse/master/fbcode/hphp/hack/src/server/serverArgs.ml;ef20a30fdb088ec460ec4dfb744d1f9d2af89da6$100-107 as the basis for this change. Reviewed By: 2BitSalute Differential Revision: D15566968 fbshipit-source-id: 728c780be9deec24d01bea2145f570f6ce7a7819
1 parent 24e1075 commit e9c2e9e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

hack/utils/build_id.ml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@ let is_build_optimized =
4040
* v5 (hvvm 3.23, 17 Nov 2017) - 'hh_client lsp' stable
4141
*)
4242
let build_api_version = 5
43+
44+
let build_version_json =
45+
let open Hh_json in
46+
JSON_Object [
47+
"commit", JSON_String build_revision;
48+
"commit_time", int_ build_commit_time;
49+
"api_version", int_ build_api_version;
50+
]

hack/utils/build_id.mli

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ val build_minor_version : int
2727
val build_api_version : int
2828
val build_mode : string
2929
val is_build_optimized : bool
30+
val build_version_json : Hh_json.json

0 commit comments

Comments
 (0)