Build process for release notes

Baptiste Jammet <[email protected]>
Newsgroups gmane.linux.debian.devel.www
Message-ID <[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.