incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1729072 - /incubator/public/trunk/report_runbook.py
Date Mon, 08 Feb 2016 04:07:37 GMT
Author: marvin
Date: Mon Feb  8 04:07:36 2016
New Revision: 1729072

URL: http://svn.apache.org/viewvc?rev=1729072&view=rev
Log:
Bound the list of releases to an exact month.

Modified:
    incubator/public/trunk/report_runbook.py

Modified: incubator/public/trunk/report_runbook.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/report_runbook.py?rev=1729072&r1=1729071&r2=1729072&view=diff
==============================================================================
--- incubator/public/trunk/report_runbook.py (original)
+++ incubator/public/trunk/report_runbook.py Mon Feb  8 04:07:36 2016
@@ -26,6 +26,7 @@ if sys.version_info < (3, 2):
 
 import argparse
 import datetime
+import calendar
 
 from report_timeline import Timeline
 
@@ -57,22 +58,24 @@ def assemble_release_list(options):
     month = ((options['month'] + 10) % 12) + 1
     year = options['year'] if month != 12 else options['year'] - 1
     date = datetime.date(day=1, month=month, year=year)
-    date_spec = "{{{date:%Y}-{date:%m}-{date:%d}}}:HEAD".format(date=date)
+    found = calendar.monthrange(year, month)
+    end = date + datetime.timedelta(days=found[1])
+    template = "{{{date:%Y}-{date:%m}-{date:%d}}}:{{{end:%Y}-{end:%m}-{end:%d}}}"
+    date_spec = template.format(date=date, end=end)
     return strip_indent("""
         ##################################################################
         # editorial  -- Assemble list of releases.
         #
         # The Board report must contain a list of releases by the
-        # Incubator project since the last report.  This can be assembled
-        # manually from the history of our dist area.
+        # Incubator project during the reporting period.  This can be
+        # assembled manually from the history of our dist area.
         #
         # The date of each release is the date it appeared in our dist
-        # area.  Since our report periods don't have hard boundaries,
-        # the only way to know which reports made the cut last month and
-        # which didn't is to check the last report.
+        # area.  We provide a list of all releases that entered
+        # distribution during the previous month.
         ##################################################################
 
-        # History of our dist area since just before the last report:
+        # History of our dist area during the reporting month.
         svn log -v -r {0} https://dist.apache.org/repos/dist/release/incubator
         """.format(date_spec))
 



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message