Exemplo n.º 1
0
def omaha_channel(platform, arch, preview):
    if platform == 'darwin':
        if preview:
            return 'test'
        else:
            return release_channel() if release_channel() not in 'release' else 'stable'
    elif platform == 'win32':
        if arch in 'ia32':
            if preview:
                arch = '86'
            else:
                arch = 'x86'
        elif arch in 'x64':
            if preview:
                arch = '64'
        if release_channel() in ['beta']:
            if preview:
                chan = '{}-{}-test'.format(arch, release_channel()[0:2])
            else:
                chan = '{}-{}'.format(arch, release_channel()[0:2])
            return chan
        elif release_channel() in ['dev']:
            if preview:
                chan = '{}-dv-test'.format(arch)
            else:
                chan = '{}-{}'.format(arch, release_channel()[0:3])
            return chan
        elif release_channel() in ['release']:
            if preview:
                chan = '{}-r-test'.format(arch)
            else:
                chan = '{}-{}'.format(arch, release_channel()[0:3])
            return chan
Exemplo n.º 2
0
def omaha_channel(platform, arch, preview, full=False):
    if platform == 'darwin':
        if preview:
            if release_channel() in ['nightly']:
                chan = 'test-nite'
            if release_channel() in ['beta']:
                chan = 'test-beta'
            elif release_channel() in ['dev']:
                chan = 'test-dev'
            elif release_channel() in ['release']:
                chan = 'test'
        else:
            chan = 'stable' if release_channel() in ['release'
                                                     ] else release_channel()
    elif platform == 'win32':
        arch = ('86' if preview else 'x86') if (arch in ['ia32']) else (
            '64' if preview else 'x64')
        if release_channel() in ['nightly', 'beta']:
            chan = '{}-{}{}'.format(arch,
                                    release_channel()[0:2],
                                    '-test' if preview else '')
        elif preview:
            if release_channel() in ['dev']:
                chan = '{}-dv-test'.format(arch)
            elif release_channel() in ['release']:
                chan = '{}-r-test'.format(arch)
        else:
            chan = '{}-{}'.format(arch, release_channel()[0:3])
    return (chan + '-full') if full else chan
Exemplo n.º 3
0
def omaha_channel(platform, arch, preview):
    if platform == 'darwin':
        if preview:
            if release_channel() in ['nightly']:
                return 'test-nite'
            if release_channel() in ['beta']:
                return 'test-beta'
            elif release_channel() in ['dev']:
                return 'test-dev'
            elif release_channel() in ['release']:
                return 'test'
        else:
            return release_channel() if release_channel() not in 'release' else 'stable'
    elif platform == 'win32':
        if arch in 'ia32':
            if preview:
                arch = '86'
            else:
                arch = 'x86'
        elif arch in 'x64':
            if preview:
                arch = '64'
        if release_channel() in ['nightly']:
            if preview:
                chan = '{}-{}-test'.format(arch, release_channel()[0:2])
            else:
                chan = '{}-{}'.format(arch, release_channel()[0:2])
            return chan
        if release_channel() in ['beta']:
            if preview:
                chan = '{}-{}-test'.format(arch, release_channel()[0:2])
            else:
                chan = '{}-{}'.format(arch, release_channel()[0:2])
            return chan
        elif release_channel() in ['dev']:
            if preview:
                chan = '{}-dv-test'.format(arch)
            else:
                chan = '{}-{}'.format(arch, release_channel()[0:3])
            return chan
        elif release_channel() in ['release']:
            if preview:
                chan = '{}-r-test'.format(arch)
            else:
                chan = '{}-{}'.format(arch, release_channel()[0:3])
            return chan