Le 26/07/2018 13:43, Laura Arjona Reina a écrit :
Resending this patch to the bug that was already open about this topic
(and had
already a patch, asking for reviews).
Sorry, I didn't take the time to look for an existing bug report.
The main difference is that I add a test for the presence of the local
clone of the repository.
Le 26/07/2018 02:08, Paul Wise a écrit :
The patch uses the webmaster-team cron git repo instead of the
release-notes repo.
Sorry, copy-paste error.
Please test to make sure that the git calls you wrote are repeatable
and will not fail if run twice in a row.
I'm not sure to fully understand, but here is an updated patch, more
tested (except the build itself, see #901180).
Baptiste
diff --git a/parts/7release-notes b/parts/7release-notes
index 395607f..6d89f2b 100755
--- a/parts/7release-notes
+++ b/parts/7release-notes
@@ -3,6 +3,7 @@
. `dirname $0`/../common.sh
notesdir=$webtopdir/release-notes
+reposdir=$notesdir/release-notes
echo "Running the full release notes build... (at `date`)"
@@ -10,22 +11,22 @@ 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 [ "$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
+ cd $notesdir
+ if ! [ -d $reposdir/.git ]; then
+ echo "Directory $reposdir is not a git repository. Cloning from git." >> $notesdir/build.log
+ git clone https://salsa.debian.org/ddp-team/release-notes.git >> $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
+ cd $reposdir
+ # Switch to $release branch
+ git checkout $release >> $notesdir/build.log 2>&1 && git pull >> $notesdir/build.log 2>&1
+ make -C $reposdir publish \
+ PUBLISHTARBALL=yes PUBLISHDIR=$webtopdir/www/releases/$release >> $notesdir/build.log 2>&1
done
date >> $notesdir/build.log