mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
20 lines
418 B
Python
20 lines
418 B
Python
|
|
import sys
|
|
|
|
def bump_version(version):
|
|
try:
|
|
parts = map(int, version.split('.'))
|
|
except ValueError:
|
|
fail('Current version is not numeric')
|
|
parts[-1] += 1
|
|
return '.'.join(map(str, parts))
|
|
|
|
|
|
def fail(message):
|
|
print(message)
|
|
sys.exit(1)
|
|
|
|
# To get the FP result reported in ODASA-6418,
|
|
#bump_version must be called (directly or transitively) from the module scope
|
|
bump_version()
|