How to use the changelog.model.Version function in changelog

To help you get started, we’ve selected a few changelog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-sdk-java-v2 / scripts / changelog / util.py View on Github external
def parse_version_string(s):
    version_parts = [s for s in s.split('.')]
    prerelease = ""
    hyphen_index = version_parts[2].find('-')
    if hyphen_index != -1:
        p = version_parts[2]
        version_parts[2] = p[0:hyphen_index]
        prerelease = p[hyphen_index + 1:]
    return Version(int(version_parts[0]), int(version_parts[1]), int(version_parts[2]), prerelease)
github aws / aws-sdk-java-v2 / scripts / changelog / util.py View on Github external
def default(self, o):
        if type(o) is Version:
            # store as a "MAJOR.MINOR.PATCH" string so it's a little easier to
            # read the raw JSON
            return o.__str__()
        return o.__dict__