mirror of https://gitlab.com/basile.b/dexed.git
fix, semver patch component mandatory
some dub package omit it
This commit is contained in:
parent
3434ce561c
commit
3dfad939ad
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
- diff dialog: the content reloaded matched to the state when the dialog was shown, not when closed. (#97)
|
- diff dialog: the content reloaded matched to the state when the dialog was shown, not when closed. (#97)
|
||||||
- editor, debugging: during a debugging session, wrong icon displayed when a breakpoint is removed.
|
- editor, debugging: during a debugging session, wrong icon displayed when a breakpoint is removed.
|
||||||
|
- DUB projects: version number without the patch component were not accepted.
|
||||||
|
|
||||||
# v3.9.12
|
# v3.9.12
|
||||||
|
|
||||||
|
|
|
@ -80,8 +80,6 @@ var
|
||||||
r: TStringRange = (ptr:nil; pos:0; len: 0);
|
r: TStringRange = (ptr:nil; pos:0; len: 0);
|
||||||
begin
|
begin
|
||||||
resetFields();
|
resetFields();
|
||||||
if throw and (text.length < 6) then
|
|
||||||
error('Invalid semVer format, at least 6 characters expected');
|
|
||||||
r.init(text);
|
r.init(text);
|
||||||
if throw and (r.front <> 'v') then
|
if throw and (r.front <> 'v') then
|
||||||
error('Invalid semVer format, the text must start with "v"');
|
error('Invalid semVer format, the text must start with "v"');
|
||||||
|
@ -90,9 +88,8 @@ begin
|
||||||
if throw and r.empty then
|
if throw and r.empty then
|
||||||
error('Invalid semVer format, minor and patch miss');
|
error('Invalid semVer format, minor and patch miss');
|
||||||
fMinor := r.popFront^.takeUntil('.').yield.ToInteger;
|
fMinor := r.popFront^.takeUntil('.').yield.ToInteger;
|
||||||
if throw and r.empty then
|
if not r.empty then
|
||||||
error('Invalid semVer format, the patch misses');
|
fPatch := r.popFront^.takeWhile(['0'..'9']).yield.ToInteger;
|
||||||
fPatch := r.popFront^.takeWhile(['0'..'9']).yield.ToInteger;
|
|
||||||
if not r.empty then
|
if not r.empty then
|
||||||
fAdditional := r.popFront^.takeUntil(#0).yield;
|
fAdditional := r.popFront^.takeUntil(#0).yield;
|
||||||
fValid := true;
|
fValid := true;
|
||||||
|
|
Loading…
Reference in New Issue