Skip to content

Commit

Permalink
[hack] Add structured json to hh --json
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Young Kim authored and facebook-github-bot committed May 31, 2019
1 parent 24e1075 commit e9c2e9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hack/utils/build_id.ml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,11 @@ let is_build_optimized =
* v5 (hvvm 3.23, 17 Nov 2017) - 'hh_client lsp' stable
*)
let build_api_version = 5

let build_version_json =
let open Hh_json in
JSON_Object [
"commit", JSON_String build_revision;
"commit_time", int_ build_commit_time;
"api_version", int_ build_api_version;
]
1 change: 1 addition & 0 deletions hack/utils/build_id.mli
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ val build_minor_version : int
val build_api_version : int
val build_mode : string
val is_build_optimized : bool
val build_version_json : Hh_json.json

0 comments on commit e9c2e9e

Please sign in to comment.