diff --git a/buildVersion.py b/buildVersion.py index fc0ed46c6286cbefe6324a818ca0233079d5e00e..d52c188ce03b4090d6fda631e7014bfc8b6e471d 100755 --- a/buildVersion.py +++ b/buildVersion.py @@ -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):