We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53dd0e6 commit 959bdcdCopy full SHA for 959bdcd
etc/version_parser.ml
@@ -3,7 +3,9 @@ let is_number x = try let _ = int_of_string x in true with _ -> false ;;
3
4
let main () =
5
let v = Sys.argv.(1) in
6
- let l = String.split_on_char '.' Str.(replace_first (regexp "^v") "" v) in
+ let v' = Str.(replace_first (regexp "^v") "" v) in (* v1.20... -> 1.20... *)
7
+ let v' = Str.(replace_first (regexp "-.*$") "" v') in (* ...-10-fjdnfs -> ... *)
8
+ let l = String.split_on_char '.' v' in
9
(* sanitization *)
10
let l =
11
match l with
0 commit comments