Skip to content

Commit

Permalink
add awkward version.ml handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Sep 13, 2019
1 parent 0a60ede commit 212c506
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,4 @@ tests/threads/export/
tests/server/test.js.map
*.merlin
lib.sexp
src/compiler/version.ml
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ endif
haxe:
dune build --workspace dune-workspace.dev src-prebuild/prebuild.exe
_build/default/src-prebuild/prebuild.exe libparams $(LIB_PARAMS) > lib.sexp
_build/default/src-prebuild/prebuild.exe version $(ADD_REVISION) $(BRANCH) $(COMMIT_SHA) > src/compiler/version.ml
dune build --workspace dune-workspace.dev src/haxe.exe
cp -f _build/default/src/haxe.exe ./${HAXE_OUTPUT}

Expand Down
7 changes: 7 additions & 0 deletions src-prebuild/prebuild.ml
Original file line number Diff line number Diff line change
Expand Up @@ -217,5 +217,12 @@ match Array.to_list (Sys.argv) with
Printf.printf "\n\t| Last -> assert false\n\t| Dollar s -> \"$\" ^ s,(\"\",[])\n\t| Custom s -> s,(\"\",[])\n"
| _ :: "libparams" :: params ->
Printf.printf "(%s)" (String.concat " " (List.map (fun s -> Printf.sprintf "\"%s\"" s) params))
| [_ ;"version";add_revision;branch;sha] ->
begin match add_revision with
| "0" | "" ->
print_endline "let version_extra = None"
| _ ->
Printf.printf "let version_extra = Some (\"git build %s\",\"%s\")" branch sha
end
| args ->
print_endline (String.concat ", " args)
4 changes: 0 additions & 4 deletions src/compiler/dune

This file was deleted.

0 comments on commit 212c506

Please sign in to comment.