Bug#901172: Fwd: Build process for release notes

Laura Arjona Reina <[email protected]>
Newsgroups gmane.linux.debian.devel.www
Message-ID <51f836dc-9586-aa46-7386-e1f64d698a7a__11944.9832513512$1532608651$gmane$org@debian.org>
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: [email protected]
Fecha: Wed, 25 Jul 2018 14:50:08 +0200
De: Baptiste Jammet <[email protected]>
Para: [email protected]

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)
7release-notes.diff (text/x-diff, 1.8 KB)
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.