def get_stackstorm_version():
    """
    Return a valid semver version string for the currently running StackStorm version.
    """
    # Special handling for dev versions which are not valid semver identifiers
    if "dev" in stackstorm_version and stackstorm_version.count(".") == 1:
        version = stackstorm_version.replace("dev", ".0")
        return version

    return stackstorm_version

    Return a valid semver version string for the currently running StackStorm version.
    
st2common/st2common/util/versioning.py