community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1687367 - in /comdev/projects.apache.org: scripts/cronjobs/parsereleases.py site/json/foundation/releases-files.json site/json/foundation/releases-orig.json
Date Wed, 24 Jun 2015 20:46:40 GMT
Author: hboutemy
Date: Wed Jun 24 20:46:39 2015
New Revision: 1687367

URL: http://svn.apache.org/r1687367
Log:
renamed releases-orig.json to releases-files.json to better match the intent

Added:
    comdev/projects.apache.org/site/json/foundation/releases-files.json
      - copied unchanged from r1687366, comdev/projects.apache.org/site/json/foundation/releases-orig.json
Removed:
    comdev/projects.apache.org/site/json/foundation/releases-orig.json
Modified:
    comdev/projects.apache.org/scripts/cronjobs/parsereleases.py

Modified: comdev/projects.apache.org/scripts/cronjobs/parsereleases.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/parsereleases.py?rev=1687367&r1=1687366&r2=1687367&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parsereleases.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parsereleases.py Wed Jun 24 20:46:39 2015
@@ -3,7 +3,7 @@ import json
 import os
 
 releases = {}
-orig = {}
+files = {}
 mainurl = "http://www.apache.org/dist/"
 
 x = 0
@@ -43,9 +43,9 @@ def cleanFilename(filename):
 def cleanReleases(committeeId):
     if len(releases[committeeId]) == 0:
         del releases[committeeId]
-        del orig[committeeId]
+        del files[committeeId]
 
-def parseDir(project, path):
+def parseDir(committeeId, path):
     print("              %s..." % path)
     if len(path) > 100:
         print("WARN too long path: recursion?")
@@ -53,12 +53,12 @@ def parseDir(project, path):
     for f, d, xd in getDirList("%s/%s" % (mainurl, path)):
         if xd:
             if ("/%s" % f) not in path and f.lower() not in ['binaries', 'repos', 'updatesite',
'current', 'stable', 'stable1', 'stable2', 'binary', 'notes', 'doc', 'eclipse', 'patches',
'docs', 'changes', 'features', 'tmp', 'cpp', 'php', 'ruby', 'py', 'py3', 'issuesfixed', 'images',
'styles', 'wikipages']:
-                parseDir(project, "%s/%s" % (path, f))
+                parseDir(committeeId, "%s/%s" % (path, f))
         elif not re.search(r"(MD5SUM|SHA1SUM|\.md5|\.mds|\.sh1|\.sh2|\.sha|\.asc|\.sig|\.bin|\.pom|\.jar|\.whl|\.pdf|\.xml|\.xsd|\.html|\.txt|\.cfg|\.ish|\.pl|RELEASE.NOTES|LICENSE|KEYS|CHANGELOG|NOTICE|MANIFEST|Changes|readme|x86|amd64|-docs-|Announcement|current|-deps|-dependencies|binary|-bin-|-javadoc-|-distro|rat_report)",
f, flags=re.IGNORECASE):
             filename = cleanFilename(f)
-            if len(filename) > 1 and filename not in releases[project]:
-                releases[project][filename] = d
-                orig[project][filename] = "%s/%s" % (path, f)
+            if len(filename) > 1 and filename not in releases[committeeId]:
+                releases[committeeId][filename] = d
+                files[committeeId][filename] = "%s/%s" % (path, f)
                 print("                  - %s\t\t\t%s" % (filename, f))
 
 
@@ -67,7 +67,7 @@ for committeeId, d, xdir in getDirList(m
         if committeeId not in ['xml', 'zzz', 'maven-repository']:
             print("Parsing /dist/%s content:" % committeeId)
             releases[committeeId] = releases[committeeId] if committeeId in releases else
{}
-            orig[committeeId] = {}
+            files[committeeId] = {}
             parseDir(committeeId, committeeId)
             cleanReleases(committeeId)
     else:
@@ -75,7 +75,7 @@ for committeeId, d, xdir in getDirList(m
             print("Parsing /dist/incubator-%s content:" % podling)
             committeeId = "incubator-%s" % podling
             releases[committeeId] = releases[committeeId] if committeeId in releases else
{}
-            orig[committeeId] = {}
+            files[committeeId] = {}
             parseDir(committeeId, "incubator/%s" % podling)
             cleanReleases(committeeId)
 
@@ -83,8 +83,8 @@ print("Writing releases.json")
 with open("../../site/json/foundation/releases.json", "w") as f:
     f.write(json.dumps(releases, sort_keys=True, indent=0))
     f.close()
-with open("../../site/json/foundation/releases-orig.json", "w") as f:
-    f.write(json.dumps(orig, sort_keys=True, indent=0))
+with open("../../site/json/foundation/releases-files.json", "w") as f:
+    f.write(json.dumps(files, sort_keys=True, indent=0))
     f.close()
 
 print("All done!")
\ No newline at end of file



Mime
View raw message