File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ check_command() {
2929check_command git
3030check_command python3
3131check_command mvn
32+ check_command jq
3233
3334# Configuration
3435MONOREPO_URL=" https://github.com/googleapis/google-cloud-java"
@@ -303,6 +304,19 @@ if [ -f "$COMMON_SH" ]; then
303304 git commit -n --no-gpg-sign -m " chore($SOURCE_REPO_NAME ): add to excluded_modules in .kokoro/common.sh"
304305 COMMIT_COUNT=$(( COMMIT_COUNT + 1 ))
305306fi
307+
308+ # 6.8 Update .repo-metadata.json if it exists
309+ REPO_METADATA=" $SOURCE_REPO_NAME /.repo-metadata.json"
310+ if [ -f " $REPO_METADATA " ]; then
311+ echo " Updating $REPO_METADATA ..."
312+ # Update "repo" to googleapis/google-cloud-java and "repo_short" to google-cloud-java
313+ jq ' .repo = "googleapis/google-cloud-java" | .repo_short = "google-cloud-java"' " $REPO_METADATA " > " ${REPO_METADATA} .tmp" && mv " ${REPO_METADATA} .tmp" " $REPO_METADATA "
314+
315+ echo " Committing $REPO_METADATA update..."
316+ git add " $REPO_METADATA "
317+ git commit -n --no-gpg-sign -m " chore($SOURCE_REPO_NAME ): update .repo-metadata.json"
318+ COMMIT_COUNT=$(( COMMIT_COUNT + 1 ))
319+ fi
306320rm -f " $SOURCE_REPO_NAME /codecov.yaml"
307321rm -f " $SOURCE_REPO_NAME /synth.metadata"
308322rm -f " $SOURCE_REPO_NAME /license-checks.xml"
You can’t perform that action at this time.
0 commit comments