def get_release_version(version):
    """
    If version ends with "-SNAPSHOT", removes that, otherwise returns the
    version without modifications.
    """
    if version is None:
        return None
    if version.endswith("-SNAPSHOT"):
        return version[0:-len("-SNAPSHOT")]
    return version