Skip to content

Commit

Permalink
Move temp replacement rules after s.move()
Browse files Browse the repository at this point in the history
  • Loading branch information
plamut committed Aug 26, 2021
1 parent 7e7bbba commit 83f1912
Showing 1 changed file with 48 additions and 51 deletions.
99 changes: 48 additions & 51 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,57 +66,6 @@
"type ",
)

# 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.move(
library,
excludes=[
Expand Down Expand Up @@ -220,4 +169,52 @@
),
)


# 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)

0 comments on commit 83f1912

Please sign in to comment.