Skip to content
Snippets Groups Projects
Commit ef76ea2c authored by legac's avatar legac
Browse files

Improve the logic within buildversion.

parent 32d75e2d
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,9 @@ NOW = datetime.datetime.now()
PACK_PLUGIN_URL = 'http://localhost:8000/%s/default/pack_plugin' % APP
# basic commands
EPYDOC = '/usr/bin/epydoc'
GIT = '/usr/bin/git'
JSDUCK = os.path.expandvars("$HOME/bin/jsduck")
YUICOMPRESSOR = os.path.expandvars("$HOME/lib/yuicompressor-2.4.8.jar")
MSG_VERSION = 'Enter the new version: '
......@@ -67,6 +69,11 @@ def epydoc():
The HTML files are located in static/plugin_dbui/docs/epydoc
"""
if not os.path.exists(GIT):
print '\n\tThe application epydoc is missing !'
print '\tSkip this step.\n'
return
# create the directory
if not os.path.exists(PYDOC):
os.makedirs(PYDOC)
......@@ -117,6 +124,11 @@ def git():
"""Commit and tag the current release.
"""
if not os.path.exists(GIT):
print '\n\tThe application git is missing !'
print '\tSkip this step.\n'
return
version = get_version()
# check tag in git
......@@ -150,6 +162,11 @@ def jsduck():
The HTML files are located in static/plugin_dbui/docs/jsduck
"""
if not os.path.exists(JSDUCK):
print '\n\tThe application jsduck is missing !'
print '\tSkip this step.\n'
return
# create the directory
if not os.path.exists(JSDOC):
os.makedirs(JSDOC)
......@@ -217,7 +234,11 @@ def web2py():
"""
print 'Build the web2py plugin binary file'
raw_input('Check that the web2py service is running ? Type CR to continue.')
rep = raw_input('Check that the web2py service is running ? Type CR to continue.')
if rep:
print '\n\tSkip this step.\n'
return
f = urllib.urlopen(PACK_PLUGIN_URL)
s = f.read()
......@@ -232,6 +253,11 @@ def yuicompressor():
"""Compresssed and minified the javascript library.
"""
if not os.path.exists(YUICOMPRESSOR):
print '\n\tThe application yuicompressor is missing !'
print '\tSkip this step.\n'
return
# clean previous version
for el in (JSLIBDEBUG, JSLIBMIN):
if os.path.exists(el):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment