-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: OwlBot config to specify correct paths with module names (#8482)
* build: set_owlbot_config * Updating OwlBot configuration files with modules * build: checking deep-copy destination * /google-cloud entries * fixed google-cloud-* directory entries
- Loading branch information
Showing
129 changed files
with
730 additions
and
686 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
# Adds module directory name into the paths in a OwlBot configuration file so | ||
# that the paths correctly reference the files under the modules in this monorepo. | ||
# | ||
# Usage: | ||
# set_owlbot_config.sh <.OwlBot.yaml path from the root> | ||
# Example: | ||
# $ set_owlbot_config.sh java-dataform/.OwlBot.yaml | ||
# | ||
# To apply the change to all OwlBot configuration files in all modules: | ||
# $ for F in `find . -maxdepth 2 -name '.OwlBot.yaml'`; do sh generation/set_owlbot_config.sh $F; done | ||
OWLBOT_FILE=$1 | ||
|
||
if [ -z "${OWLBOT_FILE}" ]; then | ||
echo "Please specify file name" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -r "${OWLBOT_FILE}" ]; then | ||
echo "File not found" | ||
exit 1 | ||
fi | ||
|
||
dir_name=$(dirname "${OWLBOT_FILE}") | ||
module_name=$(basename "${dir_name}") | ||
|
||
if [ ! -d "${module_name}" ]; then | ||
echo "module ${module_name} does not exist" | ||
exit 1 | ||
fi | ||
|
||
# For deep-remove-regex and deep-preserve-regex fields | ||
sed -i "s|\"/grpc-google|\"/${module_name}/grpc-google|" "${OWLBOT_FILE}" | ||
sed -i "s|\"/proto-google|\"/${module_name}/proto-google|" "${OWLBOT_FILE}" | ||
sed -i "s|\"/google-\.\*|\"/${module_name}/google-.*|" "${OWLBOT_FILE}" | ||
sed -i "s|\"/google-cloud|\"/${module_name}/google-cloud|" "${OWLBOT_FILE}" | ||
sed -i "s|\"/samples|\"/${module_name}/samples|" "${OWLBOT_FILE}" | ||
|
||
# In monorepo, the staging directory structure tells the destination module to | ||
# which the OwlBot Java postprocessor copies the files. | ||
if grep --quiet 'owl-bot-staging/$1' "${OWLBOT_FILE}"; then | ||
sed -i "s|owl-bot-staging|owl-bot-staging/${module_name}|" "${OWLBOT_FILE}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.