Commit 0ac244fa by Sébastien Eustace

Fix handling of post releases

parent 89208696
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
- Added hashes check when installing packages. - Added hashes check when installing packages.
### Fixed
- Fixed handking of post releases.
## [0.4.2] - 2018-03-10 ## [0.4.2] - 2018-03-10
......
...@@ -64,6 +64,11 @@ def normalize_version(version): ...@@ -64,6 +64,11 @@ def normalize_version(version):
# add version modifiers if a version was matched # add version modifiers if a version was matched
if index is not None: if index is not None:
if len(m.groups()) - 1 >= index and m.group(index): if len(m.groups()) - 1 >= index and m.group(index):
if m.group(index) == 'post':
# Post releases should be considered
# stable releases
return version
version = f'{version}' \ version = f'{version}' \
f'-{_expand_stability(m.group(index))}' f'-{_expand_stability(m.group(index))}'
...@@ -105,6 +110,8 @@ def parse_stability(version: str) -> str: ...@@ -105,6 +110,8 @@ def parse_stability(version: str) -> str:
return 'alpha' return 'alpha'
elif m.group(1) in ['rc', 'c']: elif m.group(1) in ['rc', 'c']:
return 'RC' return 'RC'
elif m.group(1) == 'post':
return 'stable'
else: else:
return 'dev' return 'dev'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment