def get_app_info(appinfo, args): """ Returns a dict with all the info about the omaha app that we will need to perform the upload """ changelog_url = "https://github.com/brave/brave-browser/blob/master/CHANGELOG.md" chrome_major = get_chrome_version().split('.')[0] chrome_minor = get_chrome_version().split('.')[1] appinfo['appguid'] = get_appguid(release_channel(), appinfo['platform']) appinfo['channel'] = release_channel() appinfo['chrome_version'] = get_chrome_version() appinfo['platform_id'] = get_platform_id(appinfo['platform']) appinfo['preview'] = args.preview if appinfo['platform'] in 'win32': # By default enable the win32 version on upload appinfo['is_enabled'] = True # The win32 version is the equivalent of the 'short_version' on darwin appinfo['version'] = chrome_major + '.' + get_upload_version() if appinfo['platform'] in 'darwin': appinfo['short_version'] = chrome_major + '.' + get_upload_version() appinfo['version'] = appinfo['short_version'].split('.')[2] + \ '.' + appinfo['short_version'].split('.')[3] appinfo['release_notes'] = 'Brave Browser version: {}\n\n<a href="{}">Brave Changelog</a>'\ .format(appinfo['version'] if appinfo['platform'] in 'win32' else appinfo['short_version'], changelog_url) return appinfo
def get_app_info(appinfo, args): """ Returns a dict with all the info about the omaha app that we will need to perform the upload """ chrome_major = get_chrome_version().split('.')[0] chrome_minor = get_chrome_version().split('.')[1] appinfo['appguid'] = get_appguid(release_channel(), appinfo['platform']) appinfo['channel'] = release_channel() appinfo['chrome_version'] = get_chrome_version() appinfo['platform_id'] = get_platform_id(appinfo['platform']) appinfo['preview'] = args.preview if appinfo['platform'] in 'win32': # By default enable the win32 version on upload appinfo['is_enabled'] = True # The win32 version is the equivalent of the 'short_version' on darwin appinfo['version'] = chrome_major + '.' + get_upload_version() if appinfo['platform'] in 'darwin': appinfo['short_version'] = chrome_major + '.' + get_upload_version() appinfo['version'] = appinfo['short_version'].split('.')[2] + \ '.' + appinfo['short_version'].split('.')[3] appinfo['release_notes'] = 'Brave Browser Channel: {}; Version: {}; Uploaded by omaha-upload.py script.'\ .format(release_channel(), appinfo['version']) return appinfo
def get_app_info(appinfo, args): """ Returns a dict with all the info about the omaha app that we will need to perform the upload """ changelog_url = "https://github.com/brave/brave-browser/blob/master/CHANGELOG_DESKTOP.md" chrome_major = get_chrome_version().split('.')[0] chrome_minor = get_chrome_version().split('.')[1] # The Sparkle CFBundleVersion is no longer tied to the Chrome version, # instead we derive it from the package.json['version'] string. The 2nd # digit is adjusted, and then we utilize that combined with the 3rd digit as # the CFBundleVersion. (This is also used in build/mac/tweak_info_plist.py) version_values = get_upload_version().split('.') if int(version_values[0]) >= 1: adjusted_minor = int( version_values[1]) + (100 * int(version_values[0])) else: # Fall back to returning the actual minor value adjusted_minor = int(version_values[1]) appinfo['appguid'] = get_appguid(release_channel(), appinfo['platform']) appinfo['channel'] = release_channel() appinfo['chrome_version'] = get_chrome_version() appinfo['platform_id'] = get_platform_id(appinfo['platform']) appinfo['preview'] = args.preview appinfo['full'] = args.full if appinfo['platform'] in 'win32': # By default enable the win32 version on upload appinfo['is_enabled'] = True # The win32 version is the equivalent of the 'short_version' on darwin appinfo['version'] = chrome_major + '.' + get_upload_version() if appinfo['platform'] in 'darwin': appinfo['short_version'] = chrome_major + '.' + get_upload_version() appinfo['version'] = str(adjusted_minor) + \ '.' + version_values[2] appinfo['release_notes'] = 'Release notes at <a href="{0}">{0}</a>'.format( changelog_url) return appinfo
def main(): if len(sys.argv) != 2 or sys.argv[1] == '-h': print 'Usage: bump-version.py [<version> | major | minor | patch]' return 1 option = sys.argv[1] increments = ['major', 'minor', 'patch'] if option in increments: version = get_electron_version() versions = parse_version(version.split('-')[0]) versions = increase_version(versions, increments.index(option)) chrome = get_chrome_version() else: versions = parse_version(option) chrome = versions[3] version = '.'.join(versions[:3]) version = version + '+' + chrome with scoped_cwd(SOURCE_ROOT): update_package_json(version) tag_version(version)
def main(): if len(sys.argv) != 2 or sys.argv[1] == '-h': print 'Usage: bump-version.py [<version> | major | minor | patch]' return 1 option = sys.argv[1] increments = ['major', 'minor', 'patch'] if option in increments: version = get_brave_version() versions = parse_version(version.split('-')[0]) versions = increase_version(versions, increments.index(option)) chrome = get_chrome_version() else: versions = parse_version(option) chrome = versions[3] version = '.'.join(versions[:3]) version = version + '+' + chrome with scoped_cwd(SOURCE_ROOT): update_package_json(version) tag_version(version)