Skip to content

Commit 7cebe48

Browse files
authored
Merge pull request #104 from googleapis/sofisl-patch-1
chore: update split-repo-post-process.sh
2 parents 16fd291 + 5233195 commit 7cebe48

File tree

1 file changed

+2
-39
lines changed

1 file changed

+2
-39
lines changed

bin/split-repo-post-process.sh

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,6 @@ echo "Adding release-please manifest version"
3131
cat .release-please-manifest.json | jq --sort-keys ". * {\"${PACKAGE_PATH}\": \"${LATEST_VERSION}\"}" > .release-please-manifest2.json
3232
mv .release-please-manifest2.json .release-please-manifest.json
3333

34-
echo "Moving ${PACKAGE_PATH}/.github/.OwlBot.yaml"
35-
mv "${PACKAGE_PATH}/.github/.OwlBot.yaml" "${PACKAGE_PATH}/.OwlBot.yaml"
36-
37-
echo "Fixing format of ${PACKAGE_PATH}/.OwlBot.yaml"
38-
# remove `docker:` line
39-
sed -i "/docker:/d" "${PACKAGE_PATH}/.OwlBot.yaml"
40-
# remove `image:` line
41-
sed -i "/image:/d" "${PACKAGE_PATH}/.OwlBot.yaml"
42-
43-
if grep -q "/owl-bot-staging/\$1/\$2" "${PACKAGE_PATH}/.OwlBot.yaml"
44-
then
45-
echo "OwlBot config is copying each folder"
46-
sed -i 's/\.\*-nodejs\/(.*)/.*-nodejs/' "${PACKAGE_PATH}/.OwlBot.yaml"
47-
sed -i "s/dest: \/owl-bot-staging\/\$1\/\$2/dest: \/owl-bot-staging\/${PACKAGE_NAME}\/\$1/" "${PACKAGE_PATH}/.OwlBot.yaml"
48-
else
49-
sed -i "s/dest: \/owl-bot-staging/dest: \/owl-bot-staging\/${PACKAGE_NAME}/" "${PACKAGE_PATH}/.OwlBot.yaml"
50-
fi
51-
52-
echo "fixing owlbot.py file"
53-
54-
if test -f "${PACKAGE_PATH}/owlbot.py"; then
55-
sed -i "s/import synthtool.languages.node as node/import synthtool.languages.node_mono_repo as node/" "${PACKAGE_PATH}/owlbot.py"
56-
echo sed -i "s/node.owlbot_main(/node.owlbot_main(relative_dir=${PACKAGE_PATH},/" "${PACKAGE_PATH}/owlbot.py"
57-
sed -i "s|node.owlbot_main(|node.owlbot_main(relative_dir=\"${PACKAGE_PATH}\",|" "${PACKAGE_PATH}/owlbot.py"
58-
fi
59-
6034
# update .repo and .issue_tracker in .repo-metadata.json
6135
echo "Update .repo-metadata.json"
6236
echo "updating .repo to googleapis/google-cloud-node-core"
@@ -89,19 +63,8 @@ echo "updating homepage"
8963
# using a temp file because jq doesn't like writing to the input file as it reads
9064
jq -r ".homepage = \"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/${PACKAGE_NAME}\"" ${PACKAGE_PATH}/package.json > ${PACKAGE_PATH}/package2.json
9165
mv ${PACKAGE_PATH}/package2.json ${PACKAGE_PATH}/package.json
92-
93-
if !(test -f "${PACKAGE_PATH}/owlbot.py"); then
94-
IMAGE="gcr.io/cloud-devrel-public-resources/owlbot-nodejs-mono-repo:latest"
95-
echo "Running post-processor: ${IMAGE}"
96-
docker pull "${IMAGE}"
97-
docker run --rm \
98-
--user $(id -u):$(id -g) \
99-
-v $(pwd):/workspace/google-cloud-node-core \
100-
-w /workspace/google-cloud-node-core \
101-
-e "DEFAULT_BRANCH=main" \
102-
"${IMAGE}"
103-
fi
66+
10467

10568
# add changes to local git directory
10669
git add .
107-
git commit -am "build: add release-please config, fix owlbot-config"
70+
git commit -am "build: add release-please config, delete owlbot-config"

0 commit comments

Comments
 (0)