[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#901172: Fwd: Build process for release notes



Resending this patch to the bug that was already open about this topic (and had
already a patch, asking for reviews).

I cannot put time on this for now (2 weeks minimum?), sorry. But maybe somebody
can review both patches and decide.

Cheers


-------- Mensaje reenviado --------
Asunto: Build process for release notes
Resent-Date: Wed, 25 Jul 2018 13:21:19 +0000 (UTC)
Resent-From: debian-www@lists.debian.org
Fecha: Wed, 25 Jul 2018 14:50:08 +0200
De: Baptiste Jammet <baptiste@mailoo.org>
Para: debian-www@lists.debian.org

Hello -www team,

Receiving #904525 on -doc, I found that the cron script for building the release
notes on the website has not been updated to use git on Salsa.
(7doc_manuals neither)

Attached is a partially tested patch to cron/parts/7release-notes
I used plain git, because the update could be more efficient. But maybe wget
*.tar.gz is preferable?

I hope this can help.

Baptiste
(not subscribed to -www)

diff --git a/parts/7release-notes b/parts/7release-notes
index 395607f..a933ca5 100755
--- a/parts/7release-notes
+++ b/parts/7release-notes
@@ -10,22 +10,25 @@ savelog -g debwww -m 664 $notesdir/build.log >/dev/null
 
 date > $notesdir/build.log
 
-# Add the release name once released/branched out of trunk
 for release in wheezy jessie stretch ; do
     echo "rebuilding the release notes for $release" >> $notesdir/build.log
-    if ! [ -d "$notesdir/$release" ] ; then
-        echo "directory $notesdir/$release does not exist. checking out SVN" >> $notesdir/build.log
+    cd $notesdir
+    if ! [ -d .git ]; then
+        echo "Not a git repository. Cloning from git." >> $notesdir/build.log
+        cd $notesdir/..
+        git clone https://salsa.debian.org/webmaster-team/cron.git >> $notesdir/build.log
         cd $notesdir
-        if [ "$release" = "stretch" ]; then
-            svn checkout svn://svn.debian.org/svn/ddp/manuals/trunk/release-notes $release >> $notesdir/build.log 2>&1
-        else
-            svn checkout svn://svn.debian.org/svn/ddp/manuals/branches/release-notes/$release >> $notesdir/build.log 2>&1
-        fi
-    else
-        (cd $notesdir/$release && svn update) >> $notesdir/build.log 2>&1
     fi
-     make -C $notesdir/$release publish \
-         PUBLISHTARBALL=yes PUBLISHDIR=$webtopdir/www/releases/$release >> $notesdir/build.log 2>&1
+    if [ "$release" = "stretch" ]; then
+        # Stay on master
+        release=master
+    fi
+    # Switch to $release branch
+    git branch $release origin/$release>> $notesdir/build.log 2>&1
+    git checkout $release >> $notesdir/build.log
+    git pull >> $notesdir/build.log
+    make -C $notesdir/$release publish \
+        PUBLISHTARBALL=yes PUBLISHDIR=$webtopdir/www/releases/$release >> $notesdir/build.log 2>&1
 done
 
 date >> $notesdir/build.log

Reply to: