Exemplo n.º 1
0
def hockeyappUpload(app,
                    dsym,
                    displayName,
                    replacementIconsDirectory,
                    mobileprovision,
                    identity,
                    ipaPackageHook=None,
                    **hockeyArgs):

    appVersion = xcode.version(app)
    identifier = xcode.identifier(mobileprovision)
    if xcode.version(app) in hockeyapp.versions(hockeyArgs['teamToken'],
                                                hockeyArgs['appIdentifier']):
        print '%(appVersion)s has already been uploaded to HockeyApp' % locals(
        )
        return

    def modify(payloadApp):
        _replaceIcons(payloadApp, replacementIconsDirectory)
        _updateAppInfo(payloadApp, displayName, identifier)
        runScript(ipaPackageHook, payloadApp)
        xcode.codesign(payloadApp, mobileprovision, identity)

    ipa = xcode.package(app, modify)

    tempdir = os.path.dirname(ipa)
    tempDsym = os.path.join(tempdir, os.path.basename(dsym))
    shutil.copytree(dsym, tempDsym)
    xcode.updateDsymIdentifier(tempDsym, identifier)

    hockeyArgs['dsym'] = tempDsym
    hockeyOutput = hockeyapp.upload(ipa, **hockeyArgs)
    shutil.rmtree(tempdir)
Exemplo n.º 2
0
def hockeyappUpload(
    app, dsym, displayName, replacementIconsDirectory, mobileprovision, identity, ipaPackageHook=None, **hockeyArgs
):

    appVersion = xcode.version(app)
    identifier = xcode.identifier(mobileprovision)
    if xcode.version(app) in hockeyapp.versions(hockeyArgs["teamToken"], hockeyArgs["appIdentifier"]):
        print "%(appVersion)s has already been uploaded to HockeyApp" % locals()
        return

    def modify(payloadApp):
        _replaceIcons(payloadApp, replacementIconsDirectory)
        _updateAppInfo(payloadApp, displayName, identifier)
        runScript(ipaPackageHook, payloadApp)
        xcode.codesign(payloadApp, mobileprovision, identity)

    ipa = xcode.package(app, modify)

    tempdir = os.path.dirname(ipa)
    tempDsym = os.path.join(tempdir, os.path.basename(dsym))
    shutil.copytree(dsym, tempDsym)
    xcode.updateDsymIdentifier(tempDsym, identifier)

    hockeyArgs["dsym"] = tempDsym
    hockeyOutput = hockeyapp.upload(ipa, **hockeyArgs)
    shutil.rmtree(tempdir)
Exemplo n.º 3
0
def releaseBuild(app, dsym, branchDirectory, target, output, ipaPackageHook, **hockeyArgs):
    def modify(payloadApp):
        runScript(ipaPackageHook, payloadApp)

    ipa = xcode.package(app, modify)
    hockeyArgs["dsym"] = dsym
    hockeyOutput = hockeyapp.upload(ipa, **hockeyArgs)
    shutil.rmtree(os.path.dirname(ipa))

    archive = xcode.archive(app, dsym, modify)
    version = projectVersion(branchDirectory, target)
    outputDirectory = _outputDirectory(output, version)
    outputArchive = os.path.join(outputDirectory, os.path.basename(archive))
    shutil.copytree(archive, outputArchive)
    shutil.rmtree(os.path.dirname(archive))
Exemplo n.º 4
0
def releaseBuild(app, dsym, branchDirectory, target, output, ipaPackageHook,
                 **hockeyArgs):
    def modify(payloadApp):
        runScript(ipaPackageHook, payloadApp)

    ipa = xcode.package(app, modify)
    hockeyArgs['dsym'] = dsym
    hockeyOutput = hockeyapp.upload(ipa, **hockeyArgs)
    shutil.rmtree(os.path.dirname(ipa))

    archive = xcode.archive(app, dsym, modify)
    version = projectVersion(branchDirectory, target)
    outputDirectory = _outputDirectory(output, version)
    outputArchive = os.path.join(outputDirectory, os.path.basename(archive))
    shutil.copytree(archive, outputArchive)
    shutil.rmtree(os.path.dirname(archive))
    return outputArchive