diff options
author | Tres Seaver <tseaver@palladion.com> | 2021-08-30 13:45:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-30 13:45:35 -0400 |
commit | 1db493cafff62e3a9f0b2d8ddf3071199db1af7e (patch) | |
tree | 49094a560b2ef040b08a861ef12a40e2b0c31c8e /owlbot.py | |
parent | e3d34d4cf7098f3d4317f28ee3a8f60a3f8c8558 (diff) | |
download | python-api-core-1db493cafff62e3a9f0b2d8ddf3071199db1af7e.tar.gz |
chore: migrate default branch to main (#264)
Diffstat (limited to 'owlbot.py')
-rw-r--r-- | owlbot.py | 45 |
1 files changed, 45 insertions, 0 deletions
@@ -44,4 +44,49 @@ s.replace( """, ) +# Remove the replacements below once https://github.com/googleapis/synthtool/pull/1188 is merged + +# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files +s.replace( + ".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main" +) + +# Customize CONTRIBUTING.rst to replace master with main +s.replace( + "CONTRIBUTING.rst", + "fetch and merge changes from upstream into master", + "fetch and merge changes from upstream into main", +) + +s.replace( + "CONTRIBUTING.rst", "git merge upstream/master", "git merge upstream/main", +) + +s.replace( + "CONTRIBUTING.rst", + """export GOOGLE_CLOUD_TESTING_BRANCH=\"master\"""", + """export GOOGLE_CLOUD_TESTING_BRANCH=\"main\"""", +) + +s.replace( + "CONTRIBUTING.rst", r"remote \(``master``\)", "remote (``main``)", +) + +s.replace( + "CONTRIBUTING.rst", "blob/master/CONTRIBUTING.rst", "blob/main/CONTRIBUTING.rst", +) + +s.replace( + "CONTRIBUTING.rst", "blob/master/noxfile.py", "blob/main/noxfile.py", +) + +s.replace( + "docs/conf.py", "master_doc", "root_doc", +) + +s.replace( + "docs/conf.py", "# The master toctree document.", "# The root toctree document.", +) + + s.shell.run(["nox", "-s", "blacken"], hide_output=False) |