Skip to content

Commit 455cb2b

Browse files
committed
fix(migration): dynamically patch .kokoro/build.sh in target clone for linter test-proxy exclusions
1 parent 831eb7a commit 455cb2b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

monorepo-migration/migrate.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,12 @@ if [ -f "$SOURCE_REPO_NAME/.kokoro/conformance.sh" ]; then
272272
sed -i.bak "s|1.24.0:exe:\${os.detected.classifier}|1.62.2:exe:\${os.detected.classifier}|" "${SOURCE_REPO_NAME}/test-proxy/pom.xml"
273273
rm -f "${SOURCE_REPO_NAME}/test-proxy/pom.xml.bak"
274274

275-
echo "Integrating test-proxy into the parent modules reactor list to fix CI linters..."
276-
sed -i.bak "s|</modules>| <module>test-proxy</module>\n </modules>|" "${SOURCE_REPO_NAME}/pom.xml"
277-
rm -f "${SOURCE_REPO_NAME}/pom.xml.bak"
275+
echo "Patching monorepo core .kokoro/build.sh inside target clone to exclude test-proxy from changed-modules linting..."
276+
sed -i.bak 's|unmanaged-dependency-check" \]\] \&\& \\|unmanaged-dependency-check" \]\] \&\& \\\n \[\[ "$(basename "${dir}")" != \*"test-proxy"\* \]\] \&\& \\|' ".kokoro/build.sh"
277+
rm -f ".kokoro/build.sh.bak"
278278

279-
git add "${SOURCE_REPO_NAME}/test-proxy/pom.xml" "${SOURCE_REPO_NAME}/pom.xml"
280-
git commit -n --no-gpg-sign -m "chore($SOURCE_REPO_NAME): fix test-proxy compilation and register as a reactor module for CI support"
279+
git add "${SOURCE_REPO_NAME}/test-proxy/pom.xml" ".kokoro/build.sh"
280+
git commit -n --no-gpg-sign -m "chore($SOURCE_REPO_NAME): fix test-proxy compilation and exclude from linter changes matrix"
281281
COMMIT_COUNT=$((COMMIT_COUNT + 1))
282282
fi
283283

0 commit comments

Comments
 (0)