Ejemplo n.º 1
0
    def upload_apks(self,
                    apks_metadata_per_paths,
                    package_name,
                    l10n_strings=None):
        edit_service = googleplay.EditService(
            self.config.service_account,
            self.config.google_play_credentials_file.name,
            package_name,
            commit=self.config.commit,
            contact_google_play=self.config.contact_google_play)

        if l10n_strings is not None:
            create_or_update_listings(edit_service, package_name, l10n_strings)

        for path, metadata in apks_metadata_per_paths.items():
            edit_service.upload_apk(path)

            if l10n_strings is not None:
                _create_or_update_whats_new(edit_service, package_name,
                                            metadata['version_code'],
                                            l10n_strings)

        all_version_codes = _get_ordered_version_codes(apks_metadata_per_paths)
        edit_service.update_track(self.config.track, all_version_codes,
                                  self.config.rollout_percentage)
        edit_service.commit_transaction()
Ejemplo n.º 2
0
def update_apk_description(package_name, force_locale, commit, service_account,
                           google_play_credentials_file, contact_google_play):
    edit_service = googleplay.EditService(service_account,
                                          google_play_credentials_file.name,
                                          package_name, commit,
                                          contact_google_play)

    moz_locales = [force_locale] if force_locale else None
    l10n_strings = store_l10n.get_translations_per_google_play_locale_code(
        package_name, moz_locales)
    create_or_update_listings(edit_service, l10n_strings)
    edit_service.commit_transaction()
Ejemplo n.º 3
0
    def update_apk_description(self, package_name):
        edit_service = googleplay.EditService(
            self.config.service_account,
            self.config.google_play_credentials_file.name,
            self.config.package_name, self.config.commit)

        moz_locales = [self.config.force_locale
                       ] if self.config.force_locale else None
        l10n_strings = store_l10n.get_translations_per_google_play_locale_code(
            package_name, moz_locales)
        create_or_update_listings(edit_service, self.config.package_name,
                                  l10n_strings, moz_locales)
        edit_service.commit_transaction()
Ejemplo n.º 4
0
    def upload_apks(self, apks, l10n_strings=None):
        for architecture, apk in apks.items():
            apk_helper.check_if_apk_has_claimed_architecture(apk['file'], architecture)
            apk_helper.check_if_apk_is_multilocale(apk['file'])

        edit_service = googleplay.EditService(
            self.config.service_account, self.config.google_play_credentials_file.name, self.config.package_name,
            commit=self.config.commit, contact_google_play=self.config.contact_google_play
        )

        if l10n_strings is not None:
            create_or_update_listings(edit_service, self.config.package_name, l10n_strings)

        for apk in apks.values():
            apk_response = edit_service.upload_apk(apk['file'])
            apk['version_code'] = apk_response['versionCode']

            if l10n_strings is not None:
                _create_or_update_whats_new(edit_service, self.config.package_name, apk['version_code'], l10n_strings)

        all_version_codes = _check_and_get_flatten_version_codes(apks)
        edit_service.update_track(self.config.track, all_version_codes, self.config.rollout_percentage)
        edit_service.commit_transaction()