MCPcopy
hub / github.com/OfflineIMAP/offlineimap / updateAPI

Method updateAPI

contrib/release.py:272–300  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

270 return True
271
272 def updateAPI(self):
273 req = "update API of the website? (requires {})".format(SPHINXBUILD)
274 if User.yesNo(req, defaultToYes=True) is False:
275 return False
276
277 try:
278 if check_call(shlex.split("{} --version".format(SPHINXBUILD))) != 0:
279 raise RuntimeError("{} not found".format(SPHINXBUILD))
280 except:
281 print("""
282Oops! you don't have {} installed?"
283Cannot update the webite documentation..."
284You should install it and manually run:"
285 $ cd {}"
286 $ make websitedoc"
287Then, commit and push changes of the website.""".format(SPHINXBUILD, DOCSDIR))
288 User.pause()
289 return False
290
291 Git.chdirToRepositoryTopLevel()
292 if not goTo('website'):
293 User.pause()
294 return False
295 if not Git.isClean:
296 print("There is WIP in the website repository: stashing")
297 Git.stash('WIP during offlineimap API import')
298
299 goTo('..')
300 return True
301
302 def buildLatest(self, version):
303 Git.chdirToRepositoryTopLevel()

Callers 1

updateWebsiteMethod · 0.95

Calls 6

goToFunction · 0.90
yesNoMethod · 0.80
pauseMethod · 0.80
stashMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected