#944 nightly.py fails because doc/api is replaced

cdk-1.2.x
closed
Rajarshi Guha
nightly (12)
5
2012-11-03
2009-08-06
Egon Willighagen
No

... by a folder name including the version number, e.g. doc/cdk-javadoc-1.2.3/ to make better archives...

Rajarshi, this requires some paths to be updated, but I'm not so fluent in python, nor sure either if there already is a variable with the CDK version number...

Discussion

  • I think this patch might do, but please check:

    $ svn diff
    Index: nightly.py
    ===================================================================
    --- nightly.py (revision 14503)
    +++ nightly.py (working copy)
    @@ -1258,12 +1259,12 @@
    olddir = os.getcwd()
    os.chdir(os.path.join(nightly_repo,'doc'))
    tfile = tarfile.open(destFile, 'w:gz')
    - tfile.add('api')
    + tfile.add("cdk-javadoc-%s" % (cdk_version))
    tfile.close()
    os.chdir(olddir)

    • shutil.copytree('%s/doc/api' % (nightly_repo),
    • '%s/api' % (nightly_web))
    • shutil.copytree('%s/doc/cdk-javadoc-%s' % (nightly_repo, cdk_version),
    • '%s/cdk-javadoc-%s' % (nightly_web, cdk_version))

       resultTable.addCell("<a href=\"javadoc-%s.tgz\">Tarball</a>" % (todayStr))
      

    I do not quite understand when to use ' or "...

     
  • Rajarshi Guha
    Rajarshi Guha
    2009-08-24

    The patch looks fine. Doesn't matter whether you use ' or " (or ''') as long as you're consistent in terms of the opening and closing of a string with the same type of quote symbol :)