Beispiel #1
0
def build_backend(app_id):
    print("Building the App")
    app_file = app_id + ".json"
    app_dict = read_appfile(apps.STORAGEINDEX + "/ios/" + app_file)
    build_lock = "{}/{}.lock".format(STORAGEOTA, app_id)
    if not os.path.exists(build_lock):
        open(build_lock, "w").close()
    else:
        print("App is already building!!!")

        # TODO check if IPA already exists
        # build procedure here
    file = "{}/{}.json".format(apps.STORAGEIOS, app_id)
    assert os.path.exists(file)
    appdict = read_appfile(file)
    url = appdict["repo"]
    assert url is not None
    app_path = apps.STORAGEBUILD + "/" + app_id
    if os.path.exists(app_path):
        shutil.rmtree(app_path)
    gc.gitclone(url, aspath=app_path)
    identities = installer.get_identities()
    assert len(identities) == 1

    # finished
    os.remove(build_lock)
    print("Finished building the app")
Beispiel #2
0
def get_identity():
	identities = installer.get_identities()
	click.secho(
	"""The app you have chosen will need to be signed,
	in order to sign the app you need to have an active Apple Developer account,
	you are also requried to generate wildcard AppID and Mobile Provisioning Profile for that AppID"""
	)
	if len(identities) > 1:
		s_identity = click.prompt("Please choose the signing identity", type=click.Choice(identities))
	elif len(identities) == 1:
		s_identity = identities[0]
	else:
		click.secho("No developer identities were found on your machine!", err=True)
		exit(1)
	return s_identity