def METHOD_NAME(self, version, vmode):
    ver_fields = []
    if '.' in version:
        ver_fields = version.split('.')
    elif ',' in version:
        ver_fields = version.split(',')
    else:
        Message.ShowError('您传入的版本号格式不正确: %s' % version)
        Common.exit_with_pause(-1)
    if vmode == '.':
        return '.'.join(ver_fields)
    elif vmode == ',':
        return ','.join(ver_fields)
    elif vmode == 'fmt':
        return 'v%s.%s.%s%s' % (
            ver_fields[0], ver_fields[1], ver_fields[2],
            '-dev' if ver_fields[3] == '1' else ''
        )
    else:
        Message.ShowError('您传入的 vmode 版本号格式不正确: %s' % vmode)
        Common.exit_with_pause(-1)
    return version