Python semver.bump_patch() Examples
The following are 4
code examples of semver.bump_patch().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
semver
, or try the search function
.
Example #1
Source File: version-update.py From gitlab-semantic-versioning with Apache License 2.0 | 6 votes |
def bump(latest): minor_bump_label = os.environ.get("MINOR_BUMP_LABEL") or "bump-minor" major_bump_label = os.environ.get("MAJOR_BUMP_LABEL") or "bump-major" merge_request_id = extract_merge_request_id_from_commit() labels = retrieve_labels_from_merge_request(merge_request_id) if minor_bump_label in labels: return semver.bump_minor(latest) elif major_bump_label in labels: return semver.bump_major(latest) else: return semver.bump_patch(latest)
Example #2
Source File: release.py From serum with MIT License | 5 votes |
def increment_version(version, release_type): if release_type == 'major': return semver.bump_major(version) elif release_type == 'minor': return semver.bump_minor(version) return semver.bump_patch(version)
Example #3
Source File: version.py From st2 with Apache License 2.0 | 5 votes |
def version_bump_patch(value): return semver.bump_patch(value)
Example #4
Source File: bump_version.py From bitmex-websocket with MIT License | 5 votes |
def bump_patch(): version_file = open(realpath('./.version'), 'r+') version = semver.bump_patch(version_file.read().rstrip()) version_file.seek(0) version_file.write(version) version_file.truncate() version_file.close() print(version)