yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sek...@apache.org
Subject yetus git commit: YETUS-235. releasedocmaker does not give an error if a non-existent version is given
Date Sat, 23 Jan 2016 13:57:26 GMT
Repository: yetus
Updated Branches:
  refs/heads/master d6481ff4e -> a6dab1557


YETUS-235. releasedocmaker does not give an error if a non-existent version is given

Signed-off-by: Allen Wittenauer <aw@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/a6dab155
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/a6dab155
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/a6dab155

Branch: refs/heads/master
Commit: a6dab1557047e89a9c4bb98c4463d78612b2896c
Parents: d6481ff
Author: Kengo Seki <sekikn@apache.org>
Authored: Wed Jan 20 08:46:16 2016 +0900
Committer: Kengo Seki <sekikn@apache.org>
Committed: Sat Jan 23 22:56:40 2016 +0900

----------------------------------------------------------------------
 release-doc-maker/releasedocmaker.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/a6dab155/release-doc-maker/releasedocmaker.py
----------------------------------------------------------------------
diff --git a/release-doc-maker/releasedocmaker.py b/release-doc-maker/releasedocmaker.py
index 70a2f8c..438d3be 100755
--- a/release-doc-maker/releasedocmaker.py
+++ b/release-doc-maker/releasedocmaker.py
@@ -158,9 +158,9 @@ class GetVersions(object):
             datum = json.loads(resp.read())
             for data in datum:
                 newversions.add(data['name'])
+        newversions.add(versions[0])
+        newversions.add(versions[-1])
         newlist = newversions.copy()
-        newlist.add(versions[0])
-        newlist.add(versions[-1])
         newlist = list(newlist)
         newlist.sort(key=LooseVersion)
         for newversion in newlist[newlist.index(versions[0]):newlist.index(versions[-1])+1]:
@@ -511,7 +511,10 @@ def main():
 
     for version in versions:
         vstr = str(version)
-        jlist = JiraIter(vstr, projects)
+        jlist = sorted(JiraIter(vstr, projects))
+        if len(jlist) == 0:
+            print "There is no issue which has the specified version: %s" % version
+            continue
 
         if vstr in RELEASE_VERSION:
             reldate = RELEASE_VERSION[vstr]
@@ -556,7 +559,7 @@ def main():
         testlist = []
         otherlist = []
 
-        for jira in sorted(jlist):
+        for jira in jlist:
             if jira.get_incompatible_change():
                 incompatlist.append(jira)
             elif jira.get_important():


Mime
View raw message