Example #1
0
    def _init_parser(cls):
        cls.parser = ArgumentParser(
            description="""Upload the apk of a Firefox app on Google play.

    Example for a beta upload:
    $ python push_apk.py --package-name org.mozilla.firefox_beta --track production \
    --service-account [email protected] --credentials key.p12 \
    --apk-x86=/path/to/fennec-XX.0bY.multi.android-i386.apk \
    --apk-armv7-v15=/path/to/fennec-XX.0bY.multi.android-arm-v15.apk""",
            formatter_class=argparse.RawDescriptionHelpFormatter,
        )

        googleplay.add_general_google_play_arguments(cls.parser)

        cls.parser.add_argument('--track', choices=googleplay.TRACK_VALUES, default='alpha',
                                help='Track on which to upload')
        cls.parser.add_argument('--rollout-percentage', type=int, choices=range(0, 101), metavar='[0-100]',
                                default=None,
                                help='The percentage of user who will get the update. Specify only if track is rollout')

        cls.parser.add_argument('--apk-x86', dest='apk_file_x86', type=argparse.FileType(),
                                help='The path to the x86 APK file', required=True)
        cls.parser.add_argument('--apk-armv7-v15', dest='apk_file_armv7_v15', type=argparse.FileType(),
                                help='The path to the ARM v7 API v15 APK file', required=True)

        google_play_strings_group = cls.parser.add_mutually_exclusive_group(required=True)
        google_play_strings_group.add_argument('--no-gp-string-update', dest='update_google_play_strings', action='store_false',
                                               help="Don't update listings and what's new sections on Google Play")
        google_play_strings_group.add_argument('--update-gp-strings-from-l10n-store', dest='update_google_play_strings_from_store',
                                               action='store_true',
                                               help="Download listings and what's new sections from the l10n store and use them \
                                               to update Google Play")
        google_play_strings_group.add_argument('--update-gp-strings-from-file', dest='google_play_strings_file', type=argparse.FileType(),
                                               help="Use file to update listing and what's new section on Google Play.\
                                               Such file can be obtained by calling fetch_l10n_strings.py")
Example #2
0
    def _init_parser(cls):
        cls.parser = ArgumentParser(
            description='Upload APKs of Firefox for Android on Google play.')

        googleplay.add_general_google_play_arguments(cls.parser)

        cls.parser.add_argument('--track',
                                action='store',
                                required=True,
                                help='Track on which to upload')
        cls.parser.add_argument(
            '--rollout-percentage',
            type=int,
            choices=range(0, 101),
            metavar='[0-100]',
            default=None,
            help=
            'The percentage of user who will get the update. Specify only if track is rollout'
        )

        cls.parser.add_argument(
            'apks',
            metavar='path_to_apk',
            type=argparse.FileType(),
            nargs='+',
            help=
            'The path to the APK to upload. You have to provide every APKs for each architecture/API level. \
                                Missing or extra APKs exit the program without uploading anything'
        )

        google_play_strings_group = cls.parser.add_mutually_exclusive_group(
            required=True)
        google_play_strings_group.add_argument(
            '--no-gp-string-update',
            dest='update_google_play_strings',
            action='store_false',
            help="Don't update listings and what's new sections on Google Play"
        )
        google_play_strings_group.add_argument(
            '--update-gp-strings-from-l10n-store',
            dest='update_google_play_strings_from_store',
            action='store_true',
            help=
            "Download listings and what's new sections from the l10n store and use them \
                                               to update Google Play")
        google_play_strings_group.add_argument(
            '--update-gp-strings-from-file',
            dest='google_play_strings_file',
            type=argparse.FileType(),
            help=
            "Use file to update listing and what's new section on Google Play.\
                                               Such file can be obtained by calling fetch_l10n_strings.py"
        )
Example #3
0
    def _init_parser(cls):
        cls.parser = ArgumentParser(
            description='Download strings from the l10n store ({})'.format(
                store_l10n.L10N_API_URL))

        cls.parser.add_argument(
            '--package-name',
            choices=store_l10n.STORE_PRODUCT_DETAILS_PER_PACKAGE_NAME.keys(),
            help='The APK package name',
            required=True)
        cls.parser.add_argument('--output-file',
                                type=argparse.FileType('w'),
                                help='The file where strings will be saved to',
                                default='l10n_strings.json')
Example #4
0
    def _init_parser(cls):
        cls.parser = ArgumentParser(
            description=
            'Download APKs of Firefox for Android (aka Fennec) from {}'.format(
                FTP_BASE_URL))

        exclusive_group = cls.parser.add_mutually_exclusive_group(
            required=True)
        exclusive_group.add_argument(
            '--version',
            default=None,
            help='Specify version number to download (e.g. 23.0b7)')
        exclusive_group.add_argument(
            '--latest-nightly',
            action='store_true',
            default=False,
            help='Download the latest nightly version')

        cls.parser.add_argument('--build',
                                type=int,
                                default=1,
                                help='Specify build number (default 1)')
        cls.parser.add_argument(
            '--arch',
            choices=cls.arch_values,
            default='all',
            help=
            'Specify which architecture to get the apk for. Will download every architecture if not set.'
        )
        cls.parser.add_argument('--locale',
                                default='multi',
                                help='Specify which locale to get the apk for')
        cls.parser.add_argument(
            '--output-directory',
            dest='download_directory',
            default='apk-download',
            help=
            'Directory in which APKs will be downloaded to. Will be created if needed.'
        )