Skip to content

Commit 83f1912

Browse files
committed
Move temp replacement rules after s.move()
1 parent 7e7bbba commit 83f1912

File tree

1 file changed

+48
-51
lines changed

1 file changed

+48
-51
lines changed

owlbot.py

Lines changed: 48 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -66,57 +66,6 @@
6666
"type ",
6767
)
6868

69-
# Remove the replacements below once
70-
# https://github.com/googleapis/synthtool/pull/1188 is merged
71-
72-
# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files
73-
s.replace(
74-
".kokoro/*.sh",
75-
"repo-automation-bots/tree/master",
76-
"repo-automation-bots/tree/main",
77-
)
78-
79-
# Customize CONTRIBUTING.rst to replace master with main
80-
s.replace(
81-
"CONTRIBUTING.rst",
82-
"fetch and merge changes from upstream into master",
83-
"fetch and merge changes from upstream into main",
84-
)
85-
86-
s.replace(
87-
"CONTRIBUTING.rst", "git merge upstream/master", "git merge upstream/main",
88-
)
89-
90-
s.replace(
91-
"CONTRIBUTING.rst",
92-
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"master\"""",
93-
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"main\"""",
94-
)
95-
96-
s.replace(
97-
"CONTRIBUTING.rst", r"remote \(``master``\)", "remote (``main``)",
98-
)
99-
100-
s.replace(
101-
"CONTRIBUTING.rst",
102-
"blob/master/CONTRIBUTING.rst",
103-
"blob/main/CONTRIBUTING.rst",
104-
)
105-
106-
s.replace(
107-
"CONTRIBUTING.rst", "blob/master/noxfile.py", "blob/main/noxfile.py",
108-
)
109-
110-
s.replace(
111-
"docs/conf.py", "master_doc", "root_doc",
112-
)
113-
114-
s.replace(
115-
"docs/conf.py",
116-
"# The master toctree document.",
117-
"# The root toctree document.",
118-
)
119-
12069
s.move(
12170
library,
12271
excludes=[
@@ -220,4 +169,52 @@
220169
),
221170
)
222171

172+
173+
# Remove the replacements below once
174+
# https://github.com/googleapis/synthtool/pull/1188 is merged
175+
176+
# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files
177+
s.replace(
178+
".kokoro/*.sh",
179+
"repo-automation-bots/tree/master",
180+
"repo-automation-bots/tree/main",
181+
)
182+
183+
# Customize CONTRIBUTING.rst to replace master with main
184+
s.replace(
185+
"CONTRIBUTING.rst",
186+
"fetch and merge changes from upstream into master",
187+
"fetch and merge changes from upstream into main",
188+
)
189+
190+
s.replace(
191+
"CONTRIBUTING.rst", "git merge upstream/master", "git merge upstream/main",
192+
)
193+
194+
s.replace(
195+
"CONTRIBUTING.rst",
196+
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"master\"""",
197+
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"main\"""",
198+
)
199+
200+
s.replace(
201+
"CONTRIBUTING.rst", r"remote \(``master``\)", "remote (``main``)",
202+
)
203+
204+
s.replace(
205+
"CONTRIBUTING.rst", "blob/master/CONTRIBUTING.rst", "blob/main/CONTRIBUTING.rst",
206+
)
207+
208+
s.replace(
209+
"CONTRIBUTING.rst", "blob/master/noxfile.py", "blob/main/noxfile.py",
210+
)
211+
212+
s.replace(
213+
"docs/conf.py", "master_doc", "root_doc",
214+
)
215+
216+
s.replace(
217+
"docs/conf.py", "# The master toctree document.", "# The root toctree document.",
218+
)
219+
223220
s.shell.run(["nox", "-s", "blacken"], hide_output=False)

0 commit comments

Comments
 (0)