def parse_args(): parser = argparse.ArgumentParser(description='Add debug link to binaries') parser.add_argument( '-d', '--directory', help='Path to the dir that contains files to add links', default=get_out_dir(), required=False) parser.add_argument('-f', '--file', help='Path to a specific file to add debug link', required=False) parser.add_argument('-s', '--debug-dir', help='Path to the dir that contain the debugs', default=None, required=True) parser.add_argument('-v', '--verbose', action='store_true', help='Prints the output of the subprocesses') parser.add_argument('--target-cpu', default='', required=False, help='Target cpu of binaries to add debug link') return parser.parse_args()
def parse_args(): parser = argparse.ArgumentParser(description='Copy debug from binaries') parser.add_argument('-d', '--directory', help='Path to the dir that contains files to copy', default=get_out_dir(), required=False) parser.add_argument('-f', '--file', help='Path to a specific file to copy debug symbols', required=False) parser.add_argument('-o', '--out-dir', help='Path to the dir that will contain the debugs', default=None, required=True) parser.add_argument('-v', '--verbose', action='store_true', help='Prints the output of the subprocesses') parser.add_argument('--target-cpu', default='', required=False, help='Target cpu of binaries to copy debug symbols') parser.add_argument('--compress', action='store_true', required=False, help='Compress the debug symbols') return parser.parse_args()
def parse_args(): parser = argparse.ArgumentParser(description='Strip linux binaries') parser.add_argument('-d', '--directory', help='Path to the dir that contains files to strip.', default=get_out_dir(), required=False) parser.add_argument('-f', '--file', help='Path to a specific file to strip.', required=False) parser.add_argument('-v', '--verbose', action='store_true', help='Prints the output of the subprocesses') parser.add_argument('--target-cpu', default='', required=False, help='Target cpu of binaries to strip') return parser.parse_args()
from io import StringIO from lib.config import PLATFORM, get_target_arch, get_env_var, s3_config, \ get_zip_name from lib.util import get_electron_branding, execute, get_electron_version, \ scoped_cwd, s3put, get_electron_exec, \ get_out_dir, SRC_DIR ELECTRON_REPO = 'electron/electron' ELECTRON_VERSION = get_electron_version() PROJECT_NAME = get_electron_branding()['project_name'] PRODUCT_NAME = get_electron_branding()['product_name'] SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) OUT_DIR = get_out_dir() DIST_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION) SYMBOLS_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'symbols') DSYM_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'dsym') PDB_NAME = get_zip_name(PROJECT_NAME, ELECTRON_VERSION, 'pdb') def main(): args = parse_args() if args.upload_to_s3: utcnow = datetime.datetime.utcnow() args.upload_timestamp = utcnow.strftime('%Y%m%d') build_version = get_electron_build_version() if not ELECTRON_VERSION.startswith(build_version):
#!/usr/bin/env python import os import glob import sys sys.path.append( os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) from lib.config import PLATFORM, s3_config, enable_verbose_mode from lib.util import get_electron_branding, execute, rm_rf, safe_mkdir, s3put, \ get_out_dir, ELECTRON_DIR RELEASE_DIR = get_out_dir() PROJECT_NAME = get_electron_branding()['project_name'] PRODUCT_NAME = get_electron_branding()['product_name'] SYMBOLS_DIR = os.path.join(RELEASE_DIR, 'breakpad_symbols') PDB_LIST = [os.path.join(RELEASE_DIR, '{0}.exe.pdb'.format(PROJECT_NAME))] def main(): os.chdir(ELECTRON_DIR) if PLATFORM == 'win32': for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, PRODUCT_NAME) files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') else: files = glob.glob(SYMBOLS_DIR + '/*/*/*.sym') + glob.glob(SYMBOLS_DIR +
#!/usr/bin/env python import os import glob import sys from lib.config import PLATFORM, s3_config, enable_verbose_mode from lib.util import get_electron_branding, execute, rm_rf, safe_mkdir, s3put, \ get_out_dir SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) RELEASE_DIR = get_out_dir() PROJECT_NAME = get_electron_branding()['project_name'] PRODUCT_NAME = get_electron_branding()['product_name'] SYMBOLS_DIR = os.path.join(RELEASE_DIR, 'breakpad_symbols') PDB_LIST = [ os.path.join(RELEASE_DIR, '{0}.exe.pdb'.format(PROJECT_NAME)) ] def main(): os.chdir(SOURCE_ROOT) if PLATFORM == 'win32': for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, PRODUCT_NAME) files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') else: files = glob.glob(SYMBOLS_DIR + '/*/*/*.sym')
#!/usr/bin/env python from __future__ import print_function import json import os import sys import urllib2 sys.path.append( os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) from lib.util import store_artifact, scoped_cwd, safe_mkdir, get_out_dir, \ ELECTRON_DIR OUT_DIR = get_out_dir() BASE_URL = 'https://electron-metadumper.herokuapp.com/?version=' version = sys.argv[1] authToken = os.getenv('META_DUMPER_AUTH_HEADER') def is_json(myjson): try: json.loads(myjson) except ValueError: return False return True def get_content(retry_count=5):
#!/usr/bin/env python import argparse import os import sys from lib.config import PLATFORM, enable_verbose_mode, is_verbose_mode from lib.util import get_electron_branding, execute, rm_rf, get_out_dir, \ SRC_DIR ELECTRON_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SOURCE_ROOT = os.path.abspath(os.path.dirname(ELECTRON_ROOT)) RELEASE_PATH = get_out_dir() def main(): args = parse_args() if args.verbose: enable_verbose_mode() rm_rf(args.destination) source_root = os.path.abspath(args.source_root) build_path = os.path.join(source_root, args.build_dir) (project_name, product_name) = get_names_from_branding() if PLATFORM in ['darwin', 'linux']: if PLATFORM == 'darwin': #macOS has an additional helper app; provide the path to that binary also main_app = os.path.join(build_path, '{0}.app'.format(product_name), 'Contents', 'MacOS', product_name) helper_name = product_name + " Helper" helper_app = os.path.join(build_path, '{0}.app'.format(helper_name),