Skip to content

Commit

Permalink
Fix incorrect Semver ecosystem next_version. (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverchang committed Nov 29, 2021
1 parent 10b90c6 commit 737948b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions lib/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/osv/ecosystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def next_version(self, package, version):
if parsed_version.prerelease:
return version + '.0'

return version + '-0'
return str(parsed_version.bump_patch()) + '-0'

@property
def is_semver(self):
Expand Down
2 changes: 1 addition & 1 deletion lib/osv/ecosystems_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_maven(self):

def test_semver(self):
ecosystem = ecosystems.get('Go')
self.assertEqual('1.0.0-0', ecosystem.next_version('blah', '1.0.0'))
self.assertEqual('1.0.1-0', ecosystem.next_version('blah', '1.0.0'))
self.assertEqual('1.0.0-pre.0', ecosystem.next_version('blah', '1.0.0-pre'))


Expand Down
2 changes: 1 addition & 1 deletion lib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setuptools.setup(
name='osv',
version='0.0.8',
version='0.0.9',
author='OSV authors',
author_email='osv-discuss@googlegroups.com',
description='Open Source Vulnerabilities library',
Expand Down

0 comments on commit 737948b

Please sign in to comment.