• Home
Name Date Size #Lines LOC

..--

new_client/04-Jul-2025-1,050892

README.mdD04-Jul-2025993 3320

apply_current_versions.shD04-Jul-2025902 2713

check_existing_release_versions.shD04-Jul-20251.6 KiB4838

check_non_release_please_versions.shD04-Jul-2025821 2922

consolidate_config.shD04-Jul-20254.1 KiB10588

copy_readme_changelog.shD04-Jul-2025623 2014

delete_non_generated_samples.shD04-Jul-2025339 1813

diff_directory.shD04-Jul-20253.2 KiB7344

diff_files.shD04-Jul-20254.9 KiB10353

gapic_bom_versions.txtD04-Jul-202595 63

generate_gapic_bom.shD04-Jul-20252 KiB6045

generate_root_pom.shD04-Jul-2025600 137

generate_root_versions_txt.shD04-Jul-2025602 2414

merge_repository.shD04-Jul-20255.2 KiB178108

readme_update.shD04-Jul-20251.3 KiB3822

release_please_config_raw.jsonD04-Jul-2025213 1212

repos.txtD04-Jul-202512 11

set_owlbot_config.shD04-Jul-20253.1 KiB8040

set_parent_pom.shD04-Jul-20251.9 KiB4727

update_owlbot_postprocessor_config.shD04-Jul-20251.1 KiB3318

update_versions.shD04-Jul-20253.9 KiB11584

README.md

1# Generation
2
3## Using scripts independently
4
5Most of the scripts in this directory can be used independently to do file updates across all modules.
6They are also used and tested by `merge_repository.sh`.
7
8## Merge repository into the monorepo
9
10Built by running [merge_repository.sh](merge_repository.sh).
11
12The script creates a new Git repository in `monorepo/google-cloud-java` by merging
13the repositories in the input.
14After running the script locally, you can `cd` into the generated repository and build the project.
15
16```shell
17cd monorepo/google-cloud-java
18mvn test -T C1 -B
19```
20
21### Input
22
23The file `repos.txt` lists all the split repos to include in the aggregation into the monorepo.
24
25### Output
26
27See: [bootstrap_output](https://github.com/googleapis/google-cloud-java/tree/bootstrap_output) branch.
28
29### Diffs
30
31The workflow also generates a diff between the current `main` branch and the generated aggregation of modules from split repos.
32See: `boostrap_outout_diff_{event}` branches.
33

readme_update.sh

1#!/bin/bash
2# This script should run as a part of new-library generation process.
3# This script introduces release-please annotations if they don't exist in the readme file
4
5for module in $(find . -mindepth 2 -maxdepth 2 -name pom.xml | sort | xargs dirname); do
6
7  if [[ "${module}" = *java-core ]] || [[ "${module}" = *java-shared-dependencies ]]; then
8    continue
9  fi
10
11  readme_file="${module}/README.md"
12
13  if [ -e ${readme_file} ] && ! [[ $(grep "x-version-update-start" ${readme_file}) ]]; then
14
15    artifactId_line=$(grep --max-count=1 'artifactId' "${readme_file}")
16
17    prefix="  <artifactId>"
18    suffix="</artifactId>"
19    string=${artifactId_line}
20    new_string=${string#"$prefix"}
21    artifactId=${new_string%"$suffix"}
22
23    echo "Handling ${artifactId}"
24
25    line_number=$(grep -n -m 1 "<dependency>" ${readme_file} | sed 's/\([0-9]*\).*/\1/')
26    start_line=${line_number}-2
27    line_number_end=$(grep -n -m 1 "Scala" ${readme_file} | sed 's/\([0-9]*\).*/\1/')
28    end_line=${line_number_end}+4
29
30    start_line_append="<!-- {x-version-update-start:${artifactId}:released} -->"
31
32    printf '%s\n' H ${start_line}i "${start_line_append}" . w | ed -s ${readme_file}
33    printf '%s\n' H ${end_line}i "<!-- {x-version-update-end} -->" . w | ed -s ${readme_file}
34
35  fi
36
37done
38