support non-numeric versions in major/minor/patch/minor-patch
This allows for two things. The first is support for non rigorous versions. However, it still fully supports semver. So if you have semver versions they work correctly, if you have alpha versions they also work correctly but using natural alpha ordering. Signed-off-by: Jordan Wilberding <diginux@gmail.com>
This commit is contained in:
parent
0db7042ff9
commit
7e4ba401fd
2 changed files with 99 additions and 38 deletions
|
@ -3,9 +3,10 @@ semver <- major_minor_patch_min_patch ("-" alpha_part ("." alpha_part)*)? ("+" a
|
|||
|
||||
major_minor_patch_min_patch <- version_part ("." version_part)? ("." version_part)? ("." version_part)? ;
|
||||
|
||||
version_part <- [0-9]+ `erlang:list_to_integer(erlang:binary_to_list(erlang:iolist_to_binary(Node)))` ;
|
||||
version_part <- numeric_part / alpha_part ;
|
||||
|
||||
alpha_part <- [A-Za-z0-9-]+ ;
|
||||
numeric_part <- [0-9]+ `erlang:list_to_integer(erlang:binary_to_list(erlang:iolist_to_binary(Node)))` ;
|
||||
alpha_part <- [A-Za-z0-9]+ `erlang:iolist_to_binary(Node)` ;
|
||||
|
||||
%% This only exists to get around a bug in erlang where if
|
||||
%% warnings_as_errors is specified `nowarn` directives are ignored
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue