5858
5959# dest paths
6060DIST_FOLDER = os .path .join (os .path .dirname (__file__ ), 'build' , 'TVB_Distribution' )
61+ DOCKER_FOLDER = os .path .join (os .path .dirname (__file__ ), 'docker' , 'step1' )
6162
6263DATA_INSIDE_FOLDER = os .path .join (DIST_FOLDER , '_tvb_data' )
6364
@@ -204,7 +205,7 @@ def ensure_tvb_current_revision(branch=None, token=None):
204205 print ("Updating tvb.version content in %s to: %s because %d != %d" % (path , new_text , written_tvb_number , real_version_number ))
205206
206207
207- def build_step1 ():
208+ def build_step1 (only_online_help = False ):
208209 # Import only after TVB Revision number has been changed, to get the latest number in generated documentation
209210 from tvb_build .tvb_documentor .doc_generator import DocGenerator
210211
@@ -221,8 +222,16 @@ def build_step1():
221222 # make help HTML, PDF manual and documentation site
222223 print ("Starting to populate %s" % DIST_FOLDER )
223224 doc_generator = DocGenerator (TVB_ROOT , DIST_FOLDER )
224- doc_generator .generate_pdfs ()
225225 doc_generator .generate_online_help ()
226+
227+ if only_online_help :
228+ if os .path .exists (DOCKER_FOLDER ):
229+ shutil .rmtree (DOCKER_FOLDER )
230+ os .makedirs (DOCKER_FOLDER )
231+ shutil .move (DIST_FOLDER , DOCKER_FOLDER )
232+ return
233+
234+ doc_generator .generate_pdfs ()
226235 doc_generator .generate_site ()
227236
228237 shutil .copy2 (LICENSE_PATH , os .path .join (DIST_FOLDER , 'LICENSE_TVB.txt' ))
@@ -248,8 +257,11 @@ def build_step1():
248257 branch = sys .argv [1 ]
249258 if branch .startswith ("origin/" ):
250259 branch = branch .replace ("origin/" ,"" )
251- token = None
260+ # token = None
261+ # if len(sys.argv) > 2:
262+ # token = sys.argv[2]
263+ # ensure_tvb_current_revision(branch, token)
264+ only_online_help = False
252265 if len (sys .argv ) > 2 :
253- token = sys .argv [2 ]
254- ensure_tvb_current_revision (branch , token )
255- build_step1 ()
266+ only_online_help = bool (sys .argv [3 ])
267+ build_step1 (only_online_help )
0 commit comments