Commit c273c51e authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Polish build_version message.

parent bf1c400c
......@@ -138,7 +138,7 @@ def build_html():
myapp/docs/user
"""
print "Build the HTML documentations..."
print "\n\tBuild the HTML documentations..."
jsduck()
......@@ -153,7 +153,7 @@ def build_pdf(doc):
doc (str): sub-directory. Possible values are api, reference, user.
"""
print "Build the PDF documentations..."
print "\n\tBuild the PDF documentations..."
if not which("pdflatex"):
print '\n\tThe application pdflatex is missing !'
......@@ -204,6 +204,7 @@ def build_pdf(doc):
os.rename(opj(latexdir, fpdf), opj(PDFDOC, fout))
# remove the latex directory
print "\n\tRemove", latexdir
call(["rm", "-rf", latexdir])
print "\tPDF file", opj(PDFDOC, fout)
......@@ -213,17 +214,17 @@ def change_log():
"""Commit CHANGELOG and VERSION files
"""
print "Commit CHANGELOG..."
print "\n\tCommit CHANGELOG..."
if not which("git"):
print '\n\tThe application git is missing !'
print '\tSkip this step.\n'
return
# Commit modified files
print 'git add', CHANGELOG, VERSION
print '\tgit add', CHANGELOG, VERSION
git("add", CHANGELOG, VERSION)
print 'git commit'
print '\tgit commit'
msg = "Start release %s" % get_version()
git("commit -m", msg)
......@@ -251,7 +252,7 @@ def compile_js():
http://docs.sencha.com/extjs/4.2.2/#!/guide/command
"""
print "Compile the javascript code ..."
print "\n\tCompile the javascript code ..."
sencha = which("sencha")
if len(sencha) == 0:
......@@ -388,7 +389,7 @@ def install_plugin_git(repository, plugin, release):
release (str): release number for plugins.
"""
print "\nInstall plugin", plugin
print "\n\tInstall plugin", plugin
# delete existing version
for path in glob("./*/plugin_%s*" % plugin):
......@@ -483,7 +484,7 @@ def jsduck():
The HTML files are located in static/plugin_dbui/docs/jsduck
"""
print "Build the javascript documentation..."
print "\n\tBuild the javascript documentation..."
cmd = which("jsduck")
if len(cmd) == 0:
......@@ -492,11 +493,11 @@ def jsduck():
return
if not os.path.exists(JSLIBSRC):
print '\n\tNo javascript library. Exit.'
print '\n\tNo javascript library. Exit.\n'
return
# clean
print "\n\tRemove old javascript documentation..."
print "\n\tRemove old javascript documentation...\n"
call(["rm", "-rf", JSDOC])
# NOTE
......@@ -540,7 +541,7 @@ def set_version(version):
version (str): release identifier
"""
print "Update CHANGELOG with the release", version, "..."
print "\n\tUpdate CHANGELOG / VERSION with release", version, "..."
# check tag in git
if version in check_output(["git", "tag"]):
......@@ -600,7 +601,7 @@ def sphinx(builder, doc):
doc (str): possible value are api, reference, user
"""
print "\nBuild", builder, "documentation for", doc, "...\n"
print "\n\tBuild", builder, "documentation for", doc, "...\n"
cmd = which("sphinx-build")
if len(cmd) == 0:
......@@ -654,12 +655,12 @@ def start_release():
"""Start the release cycle.
"""
print "Start the release cycle..."
print "\n\tStart the release cycle..."
git("checkout", "master")
old_release = get_version()
print "Current release is", old_release
print "\tCurrent release is", old_release
new_release = raw_input(MSG_RELEASE)
if not new_release:
......@@ -683,12 +684,12 @@ def which(cmd):
"""
# local host
try:
out = check_output(["which", cmd])
return [out.strip("\n")]
except CalledProcessError:
print "\n\tCommand", cmd, "not found on the localhost"
# try:
# out = check_output(["which", cmd])
# return [out.strip("\n")]
#
# except CalledProcessError:
# print "\n\tCommand", cmd, "not found on the localhost"
# docker container is running ?
container = ARGS.docker_container
......@@ -696,7 +697,7 @@ def which(cmd):
for line in check_output(["docker", "ps"]).split("\n"):
li = line.split()
if li[-1] == container:
if len(li) and li[-1] == container:
is_running = True
break
......@@ -852,4 +853,5 @@ if __name__ == '__main__':
if ARGS.version:
print "\nThe current release is %s\n" % get_version()
print
sys.exit(0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment