diff --git a/plasma/lib/plasma_www_index_template.rb b/plasma/lib/plasma_www_index_template.rb index f7801cb..4d34930 100644 --- a/plasma/lib/plasma_www_index_template.rb +++ b/plasma/lib/plasma_www_index_template.rb @@ -1,66 +1,65 @@ # Copyright (C) 2018 Jonathan Riddell # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License or (at your option) version 3 or any later version # accepted by the membership of KDE e.V. (or its successor approved # by the membership of KDE e.V.), which shall act as a proxy # defined in Section 14 of version 3 of the license. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . require_relative 'plasma_template' # Generate new Plasma text block for www.kde.org/index.php class PlasmaWWWIndexTemplate < PlasmaTemplate def initialize super('plasma_www_index_template') end end # Insert the new block into the php file class WWWIndexUpdater attr_accessor :wwwcheckout def initialize @plasma_versions = PlasmaVersion.new @wwwcheckout = @plasma_versions.wwwcheckout + "/index.php" end def rewrite_index index_template = PlasmaWWWIndexTemplate.new new_announce_block_output = index_template.render index_html = nil open(@wwwcheckout) do |f| index_html = f.readlines() end # take out old text old_announce_block_index = index_html.find_index do |line| - line.include?('Today KDE releases a new release of KDE Plasma') + line.include?('Today KDE releases a new') end (0..4).each do index_html.delete_at(old_announce_block_index-2) end # add in new text - marker_line = index_html.index(' -') + marker_line = index_html.index(" \n") index_html.insert(marker_line+1, new_announce_block_output) # convert to string output = '' index_html.each do |line| output += line end output end end diff --git a/plasma/plasma-release b/plasma/plasma-release index 870a25f..6a62a8b 100755 --- a/plasma/plasma-release +++ b/plasma/plasma-release @@ -1,72 +1,72 @@ #!/bin/bash set -xe . VERSIONS.inc sudo apt install w3m ssh $UPLOADSERVER "chmod 755 ${FTPSTABLE}/plasma/${VERSION}" # remove non-release notice in www/announcements/plasma-5.x.y.php and www/info/plasma-5.x.y.php sed -i "/NOT OUT YET/d" ${ANNOUNCECHECKOUT}/plasma-${VERSION}.php sed -i "/NOT OUT YET/d" ${INFOCHECKOUT}/plasma-${VERSION}.php # www/announcements/index.php ANNOUNCEINDEX="<\!-- Plasma ${VERSION} -->\n${RELEASEDATE}<\/strong> - Plasma ${VERSION}<\/a>\n
\n\"KDE Ships Plasma ${VERSION}.<\/em>\"\n

" sed -i "s/\(INSERT NEW ENTRIES.*\)/\1\n${ANNOUNCEINDEX}/" ${ANNOUNCECHECKOUT}/index.php # www/index.php # Updating www/index.php got ported to Ruby -#./plasma-release-webpages +./plasma-release-webpages # commit to svn pushd ${ANNOUNCECHECKOUT} svn diff svn commit -m "release plasma ${VERSION}" cd ${INFOCHECKOUT} svn diff svn commit -m "release plasma ${VERSION}" cd ${WWWCHECKOUT} svn diff svn commit -m "release plasma ${VERSION}" # copy announce over to Dot for publishing popd firefox https://www.kde.org/info/plasma-${VERSION}.php firefox https://www.kde.org/announcements/plasma-${VERSION}.php firefox https://www.kde.org/announcements/index.php firefox https://www.kde.org/ rm -rf tmp-announcements mkdir tmp-announcements ./plasma-dot-story -v ${VERSION} > tmp-announcements/DOT-STORY.html kate tmp-announcements/DOT-STORY.html w3m tmp-announcements/DOT-STORY.html -dump > tmp-announcements/KDE-ANNOUNCE_TEXT.txt sed -i "s,Live Images.*,https://www.kde.org/announcements/plasma-${VERSION}.php\nhttps://www.kde.org/announcements/plasma-${OLD_VERSION}-${VERSION}-changelog.php," tmp-announcements/KDE-ANNOUNCE_TEXT.txt echo "e-mail me to kde-announce@kde.org" > tmp-announcements/KDE-ANNOUNCE_TEXT2.txt cat tmp-announcements/KDE-ANNOUNCE_TEXT.txt >> tmp-announcements/KDE-ANNOUNCE_TEXT2.txt kate tmp-announcements/KDE-ANNOUNCE_TEXT2.txt # post on twitter, g+, facebook, reddit (r/kde and r/linux) echo "@kdecommunity releases Plasma ${VERSION} to fix your bugs https://www.kde.org/announcements/plasma-${VERSION}.php" > tmp-announcements/twitter.text kate tmp-announcements/twitter.text firefox https://tweetdeck.twitter.com firefox https://facebook.com/kde firefox https://mastodon.technology/ firefox https://www.reddit.com/r/kde/submit firefox https://dot.kde.org/#overlay=node/add/story # e-mail release-team@kde.org, plasma-devel@kde.org with the happy news echo "e-mail me to kde-announce@kde.org, release-team@kde.org, plasma-devel@kde.org" > tmp-announcements/release-team echo "Plasma ${VERSION} is now released https://www.kde.org/announcements/plasma-${VERSION}.php" >> tmp-announcements/release-team kate tmp-announcements/release-team diff --git a/plasma/templates/plasma_www_index_template.php.erb b/plasma/templates/plasma_www_index_template.php.erb index cd15f3f..eeff657 100644 --- a/plasma/templates/plasma_www_index_template.php.erb +++ b/plasma/templates/plasma_www_index_template.php.erb @@ -1,5 +1,5 @@ -

  • -

    KDE Plasma <%= version %> Released <%= releasedate %>

    - Today KDE releases a new release of KDE Plasma 5, versioned <%= version %> -
    Read full announcement -
  • +
  • +

    KDE Plasma <%= version %> Released <%= releasedate %>

    + Today KDE releases a new release of KDE Plasma 5, versioned <%= version %> + Read full announcement +