فهرست منبع

HADOOP-12202. releasedocmaker drops missing component and assignee entries (aw)

(cherry picked from commit adbacf7010373dbe6df239688b4cebd4a93a69e4)
(cherry picked from commit d7697831e3b24bec149990feed819e7d96f78184)
Allen Wittenauer 10 سال پیش
والد
کامیت
f54862ff15
1فایلهای تغییر یافته به همراه12 افزوده شده و 12 حذف شده
  1. 12 12
      dev-support/releasedocmaker.py

+ 12 - 12
dev-support/releasedocmaker.py

@@ -420,6 +420,8 @@ def main():
   else:
     title=options.title
 
+  haderrors=False
+
   for v in versions:
     vstr=str(v)
     jlist = JiraIter(vstr,projects)
@@ -468,14 +470,6 @@ def main():
     for jira in sorted(jlist):
       if jira.getIncompatibleChange():
         incompatlist.append(jira)
-        if (len(jira.getReleaseNote())==0):
-            warningCount+=1
-
-      if jira.checkVersionString():
-         warningCount+=1
-
-      if jira.checkMissingComponent() or jira.checkMissingAssignee():
-        errorCount+=1
       elif jira.getType() == "Bug":
         buglist.append(jira)
       elif jira.getType() == "Improvement":
@@ -496,6 +490,7 @@ def main():
              notableclean(jira.getSummary()))
 
       if (jira.getIncompatibleChange()) and (len(jira.getReleaseNote())==0):
+        warningCount+=1
         reloutputs.writeKeyRaw(jira.getProject(),"\n---\n\n")
         reloutputs.writeKeyRaw(jira.getProject(), line)
         line ='\n**WARNING: No release note provided for this incompatible change.**\n\n'
@@ -503,9 +498,11 @@ def main():
         reloutputs.writeKeyRaw(jira.getProject(), line)
 
       if jira.checkVersionString():
+          warningCount+=1
           lintMessage += "\nWARNING: Version string problem for %s " % jira.getId()
 
       if (jira.checkMissingComponent() or jira.checkMissingAssignee()):
+          errorCount+=1
           errorMessage=[]
           jira.checkMissingComponent() and errorMessage.append("component")
           jira.checkMissingAssignee() and errorMessage.append("assignee")
@@ -520,11 +517,11 @@ def main():
     if (options.lint is True):
         print lintMessage
         print "======================================="
-        print "Error:%d, Warning:%d \n" % (errorCount, warningCount)
-
+        print "%s: Error:%d, Warning:%d \n" % (vstr, errorCount, warningCount)
         if (errorCount>0):
-            cleanOutputDir(version)
-            sys.exit(1)
+           haderrors=True
+           cleanOutputDir(vstr)
+           continue
 
     reloutputs.writeAll("\n\n")
     reloutputs.close()
@@ -571,5 +568,8 @@ def main():
   if options.index:
     buildindex(title,options.license)
 
+  if haderrors is True:
+    sys.exit(1)
+
 if __name__ == "__main__":
   main()