def main(argv): """The main func!""" parser = get_parser() opts = parser.parse_args(argv) if not os.path.exists(opts.gpgdir): parser.error(f'--gpgdir does not exist: {opts.gpgdir}') if not opts.force and not re.match(RE_VALID_TAG, opts.tag): parser.error( f'tag "{opts.tag}" does not match regex "{RE_VALID_TAG}"; ' 'use --force to sign anyways') if opts.key: print(f'Using custom key to sign: {opts.key}') else: print('Using official Repo release key to sign') opts.key = KEYID util.import_release_key(opts) sign(opts) check(opts) postmsg(opts) return 0
def main(argv): """The main func!""" parser = get_parser() opts = parser.parse_args(argv) if not os.path.exists(opts.gpgdir): parser.error(f'--gpgdir does not exist: {opts.gpgdir}') if not os.path.exists(opts.launcher): parser.error(f'launcher does not exist: {opts.launcher}') opts.launcher = os.path.relpath(opts.launcher) print(f'Signing "{opts.launcher}" launcher script and saving to ' f'"{opts.launcher}.asc"') if opts.keys: print(f'Using custom keys to sign: {" ".join(opts.keys)}') else: print('Using official Repo release keys to sign') opts.keys = [util.KEYID_DSA, util.KEYID_RSA, util.KEYID_ECC] util.import_release_key(opts) sign(opts) check(opts) postmsg(opts) return 0