Example #1
0
def prepare_sal_release():

    files_to_copy = [
        [get_sal_repo_absolute(), '/include/'],
        [get_sal_repo_absolute(), '/src/include/'],
        [get_sal_repo_absolute(), '/build'], [get_sal_repo_absolute(), '/lib'],
        [get_sal_repo_absolute(), '/scripts'],
        [get_sal_repo_absolute(), '/config'],
        [get_sal_repo_absolute(), '/proto'],
        [get_sal_repo_absolute(), '/README.md'],
        [get_sal_repo_absolute(), '/test/sal_service_test_BF6064.py'],
        [get_sal_repo_absolute(), '/test/sal_service_test_BF2556.py'],
        [get_sal_repo_absolute(), '/test/TestUtil.py'],
        [get_sal_repo_absolute(), '/sal_services_pb2.py'],
        [get_sal_repo_absolute(), '/sal_services_pb2_grpc.py'],
        [get_sal_repo_absolute(), '/sal_services.grpc.pb.cc'],
        [get_sal_repo_absolute(), '/sal_services.grpc.pb.h'],
        [get_sal_repo_absolute(), '/sal_services.pb.cc'],
        [get_sal_repo_absolute(), '/sal_services.pb.h']
    ]

    package_input = input("Package 3rdParty [y]/n:")
    if not package_input:
        package_input = 'y'
    if package_input == 'y':
        files_to_copy.append([
            get_sal_repo_absolute(), '/{}/lib'.format(sal_3rdparty_build_dir)
        ])
        files_to_copy.append([
            get_sal_repo_absolute(),
            '/{}/include'.format(sal_3rdparty_build_dir)
        ])
        files_to_copy.append([
            get_sal_repo_absolute(), '/{}/bin'.format(sal_3rdparty_build_dir)
        ])
        files_to_copy.append([
            get_sal_repo_absolute(), '/{}/share'.format(sal_3rdparty_build_dir)
        ])

    create_release(get_sal_repo_absolute(), files_to_copy)

    return True
Example #2
0
def prepare_bsp_pkg():
    bsp_repo_abs = get_bsp_repo_abs_path()
    earliest_commit_hash = execute_cmd_n_get_output_2(
        'git --git-dir {0}/.git rev-list --max-parents=0 HEAD'.format(
            bsp_repo_abs))
    latest_commit_hash = execute_cmd_n_get_output_2(
        'git --git-dir {0}/.git rev-parse HEAD'.format(bsp_repo_abs))
    os.chdir(bsp_repo_abs)
    execute_cmd_n_get_output_2(
        'git --git-dir {0}/.git diff {1} {2} -- '
        '\':!./platforms/apsn/\' '
        '\':!.idea/\' '
        '\':!.gitignore\' '
        '\':!autom4te.cache\' '
        '\':!*Makefile.in\' '
        '> {3}'.format(bsp_repo_abs, earliest_commit_hash, latest_commit_hash,
                       bsp_repo_abs + '/' + get_diff_file_name()))
    create_release(bsp_repo_abs,
                   [[bsp_repo_abs, get_diff_file_name()],
                    [bsp_repo_abs, '/platforms/apsn/']])