def updateAPI(self): req = "update API of the website? (requires {})".format(SPHINXBUILD) if User.yesNo(req, defaultToYes=True) is False: return False try: if check_call(shlex.split("{} --version".format(SPHINXBUILD))) != 0: raise RuntimeError("{} not found".format(SPHINXBUILD)) except: print(""" Oops! you don't have {} installed?" Cannot update the webite documentation..." You should install it and manually run:" $ cd {}" $ make websitedoc" Then, commit and push changes of the website.""".format(SPHINXBUILD, DOCSDIR)) User.pause() return False Git.chdirToRepositoryTopLevel() if not goTo('website'): User.pause() return False if not Git.isClean: print("There is WIP in the website repository: stashing") Git.stash('WIP during offlineimap API import') goTo('..') return True
def exportDocs(self): if not goTo(DOCSDIR): User.pause() return if check_call(shlex.split("make websitedoc")) != 0: print("error while calling 'make websitedoc'") exit(3)
def createImportBranch(self, version): branchName = "import-v{}".format(version) Git.chdirToRepositoryTopLevel() if not goTo("website"): User.pause() return Git.checkout(branchName, create=True) Git.add('.') Git.commit("update for offlineimap v{}".format(version)) User.pause( "website: branch '{}' is ready for a merge in master!".format( branchName)) goTo('..') return branchName
def exportDocs(self, version): branchName = "import-v{}".format(version) if not goTo(DOCSDIR): User.pause() return if check_call(shlex.split("make websitedoc")) != 0: print("error while calling 'make websitedoc'") exit(3) Git.chdirToRepositoryTopLevel() if not goTo("website"): User.pause() return Git.checkout(branchName, create=True) Git.add('.') Git.commit("update for offlineimap v{}".format(version)) User.pause( "website: branch '{}' is ready for a merge in master!".format( branchName)) goTo('..') return branchName
release = Release() Git.chdirToRepositoryTopLevel() try: release.prepare() currentVersion = release.getVersion() release.requestVersion(currentVersion) release.updateVersion() newVersion = release.getVersion() release.checkVersions(currentVersion, newVersion) release.updateChangelog() release.writeAnnounce() User.pause() release.make() release.updateWebsite(newVersion) release.after() websiteBranch = release.getWebsiteBranch() print(END_MESSAGE.format( announce=ANNOUNCE_FILE, new_version=newVersion, website_branch=websiteBranch) ) except Exception as e: release.restore() raise