mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
* Refactor the code for getting the svn revision so it can be shared.
* Refactor the code for uploading files to the nightly server to its own helper function. * Add command to build and upload a docs tarball. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -20,7 +20,7 @@ import subprocess
|
||||
|
||||
# Phoenix-specific imports
|
||||
import templates
|
||||
from buildtools.config import copyIfNewer, writeIfChanged, newer
|
||||
from buildtools.config import copyIfNewer, writeIfChanged, newer, getSvnRev
|
||||
|
||||
from utilities import Wx2Sphinx
|
||||
from constants import HTML_REPLACE, TODAY, SPHINXROOT, SECTIONS_EXCLUDE
|
||||
@@ -661,18 +661,8 @@ def PostProcess(folder):
|
||||
# ----------------------------------------------------------------------- #
|
||||
|
||||
def ChangeSVNRevision(text):
|
||||
|
||||
svn_result = subprocess.Popen(["svn", "info"], stdout=subprocess.PIPE).communicate()[0]
|
||||
SVN_REVISION = ''
|
||||
for line in svn_result.split("\n"):
|
||||
if line.startswith("Revision"):
|
||||
SVN_REVISION = line.split(":")[-1].strip()
|
||||
break
|
||||
|
||||
if not SVN_REVISION:
|
||||
text = text.replace('|TODAY|', TODAY)
|
||||
return text
|
||||
|
||||
SVN_REVISION = getSvnRev()
|
||||
text = text.replace('|TODAY|', TODAY)
|
||||
text = text.replace('|SVN|', SVN_REVISION)
|
||||
return text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user