[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [sysadmin/release-tools] tools/releaseschedule: Add DTSTAMP; auto set release tag #; adjust techbase
From:       Kurt Hindenburg <kurt.hindenburg () gmail ! com>
Date:       2016-10-29 16:32:43
Message-ID: E1c0WYl-00047G-Tp () code ! kde ! org
[Download RAW message or body]

Git commit 9305fa2db6b29f5cb38874fd851a4b1a93a9b9dc by Kurt Hindenburg.
Committed on 29/10/2016 at 16:29.
Pushed by hindenburg into branch 'master'.

Add DTSTAMP; auto set release tag #; adjust techbase to calc tags

Newer ics require DTSTAMP which is when the file was created.
Fixed automatically setting release tag
Change the generation of the techbase text to auto set release tags

M  +28   -9    tools/releaseschedule/mainclass.cpp

http://commits.kde.org/sysadmin/release-tools/9305fa2db6b29f5cb38874fd851a4b1a93a9b9dc


diff --git a/tools/releaseschedule/mainclass.cpp \
b/tools/releaseschedule/mainclass.cpp index 04f1077..22387f0 100644
--- a/tools/releaseschedule/mainclass.cpp
+++ b/tools/releaseschedule/mainclass.cpp
@@ -28,13 +28,13 @@ QString MainClass::explanation( Events event )
                 desc = "From this moment on it is not allowed to add new \
dependencies or bump dependencies versions. It is possible to get an exception for \
this. Post the patch to reviewboard and add the release-team as reviewer. We will \
check if the dependency is needed and is available on all platforms. In other words, \
if you have a feature that requires a new dependency or a version of a dependency \
that is higher than currently checked for in the build system, you need to have \
committed this change before this date.";  break;
         case freezebetatagrelease :
-                desc = "Only bugfixes from this point on. Bugfixes needing user \
visible text changes need approval from kde-i18n-doc@kde.org. Beta is tagged (tag \
name is vXX.YY.80). As soon as the tarballs have been confirmed to build and the \
Release Team thinks they meet enough quality it will be released."; +                \
desc = "Only bugfixes from this point on. Bugfixes needing user visible text changes \
need approval from kde-i18n-doc@kde.org. Beta is tagged (tag name is vXX.YYPREV.80). \
As soon as the tarballs have been confirmed to build and the Release Team thinks they \
meet enough quality it will be released.";  break;
         case rctagrelease :
-                desc = "Release Candidate is tagged (tag name is vXX.YY.90). As soon \
as the tarballs have been confirmed to build and the Release Team thinks they meet \
enough quality it will be released."; +                desc = "Release Candidate is \
tagged (tag name is vXX.YYPREV.90). As soon as the tarballs have been confirmed to \
build and the Release Team thinks they meet enough quality it will be released.";  \
break;  case finaltag :
-                desc = "The branch is frozen for final release tagging (tag name is \
v15.12.0). Only urgent fixes, such as those fixing compilation errors, should be \
committed."; +                desc = "The branch is frozen for final release tagging \
(tag name is vXX.YY.0). Only urgent fixes, such as those fixing compilation errors, \
should be committed.";  break;
         case finalrelease :
                 desc = "Final release is released for general consumption.";
@@ -126,22 +126,39 @@ QMultiMap<QDate, QPair<QString, QString> > \
MainClass::generateTimeline()  
 void MainClass::slotGenerateTechbase()
 {
-    // TODO: This needs the same replacement of XX.YY as iCal has
-    //
+    // Needed for tag names vXX.(YY-1)
+    QString mainVersion(ui->versionEdit->text());
+    QString versionX = mainVersion.section('.', 0, 0);
+    QString versionY = mainVersion.section('.', 1, 1);
+    QString versionprevY = versionY;
+    bool ok;
+    int versionYminus1 = versionY.toInt(&ok, 10);
+    if (ok) {
+        versionprevY = QString::number(versionYminus1 - 1);
+    }
+
     QMultiMap<QDate, QPair<QString, QString> > timeline = generateTimeline();
 
     QLocale english( QLocale::English );     // Dates in english
     QString text;
     QMap<QDate, QPair<QString, QString> >::const_iterator i;
-    for (i = timeline.constBegin(); i != timeline.constEnd(); ++i)
-     text.append( "=== " + english.toString( i.key() ) + ": " + i.value().first + " \
                ===\n" +
-                  i.value().second + "\n\n");
+    for (i = timeline.constBegin(); i != timeline.constEnd(); ++i) {
+        text.append( "=== " + english.toString( i.key() ) + ": " + i.value().first + \
" ===\n"); +        QString desc(i.value().second);
+        desc.replace("XX", versionX);
+        desc.replace("YYPREV", versionprevY);
+        desc.replace("YY", versionY);
+        desc.replace('\n',' ');
+        text.append(desc + "\n\n" );
+    }
 
     ui->schedule->setText( text );
 }
 
 void MainClass::slotGenerateICal()
 {
+    QDate dnow = QDate::currentDate();
+
     // Needed for tag names vXX.(YY-1)
     QString mainVersion(ui->versionEdit->text());
     QString versionX = mainVersion.section('.', 0, 0);
@@ -164,6 +181,7 @@ void MainClass::slotGenerateICal()
     for (i = timeline.constBegin(); i != timeline.constEnd(); ++i) {
         text.append( "BEGIN:VEVENT\r\n");
         QDateTime dt( i.key() );
+        text.append( "DTSTAMP:" + dnow.toString( "yyyyMMdd" ) + "T000000Z\r\n" );
         text.append( "DTSTART;VALUE=DATE:" + dt.toString( "yyyyMMdd" ) + "\r\n" );
         text.append( "DTEND;VALUE=DATE:" + dt.addDays(1).toString( "yyyyMMdd" ) + \
"\r\n" );  text.append( "X-MICROSOFT-CDO-ALLDAYEVENT:TRUE\r\n" );
@@ -172,7 +190,8 @@ void MainClass::slotGenerateICal()
         text.append( "SUMMARY:" + i.value().first + "\r\n" );
         QString desc(i.value().second);
         desc.replace("XX", versionX);
-        desc.replace("YY", versionprevY);
+        desc.replace("YYPREV", versionprevY);
+        desc.replace("YY", versionY);
         desc.replace('\n',' ');
         text.append( "DESCRIPTION:" + desc + "\r\n" );
         QCryptographicHash md5( QCryptographicHash::Md5 );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic