From 21fc723db4e0a6e4c15dc69fc5f708b5241fcf45 Mon Sep 17 00:00:00 2001 From: Jonathan Harker Date: Thu, 13 Oct 2016 12:51:17 +1300 Subject: [PATCH 1/2] Move old manual versions to a monthly cron. - New cron job in /etc/cron.monthly to build old manual versions. - Adds a timestamp to the log. --- .gitignore | 1 + maharadocs-1.7/debian/maharadocs.cron.daily | 17 +++++----- maharadocs-1.7/debian/maharadocs.cron.monthly | 31 +++++++++++++++++++ 3 files changed, 40 insertions(+), 9 deletions(-) mode change 100644 => 100755 maharadocs-1.7/debian/maharadocs.cron.daily create mode 100755 maharadocs-1.7/debian/maharadocs.cron.monthly diff --git a/.gitignore b/.gitignore index 4532735..b5b27b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.changes *.deb maharadocs-1.5/debian/files maharadocs-1.5/debian/maharadocs.debhelper.log diff --git a/maharadocs-1.7/debian/maharadocs.cron.daily b/maharadocs-1.7/debian/maharadocs.cron.daily old mode 100644 new mode 100755 index ece051f..c31c23f --- a/maharadocs-1.7/debian/maharadocs.cron.daily +++ b/maharadocs-1.7/debian/maharadocs.cron.daily @@ -11,15 +11,14 @@ LOGDIR=$RET LOGFILE=${LOGDIR}/update.log cd $INSTALLDIR + +# Add a useful timestamp +echo ==================================== >> $LOGFILE +date '+%Y-%m-%d %H:%M:%S %Z' >> $LOGFILE +echo ==================================== >> $LOGFILE + git pull >> $LOGFILE -make -C $INSTALLDIR update html epub MAHARA=1.4 >> $LOGFILE 2>&1 -make -C $INSTALLDIR update html epub MAHARA=1.5 >> $LOGFILE 2>&1 -make -C $INSTALLDIR update html epub MAHARA=1.6 >> $LOGFILE 2>&1 -make -C $INSTALLDIR update html epub MAHARA=1.7 >> $LOGFILE 2>&1 -make -C $INSTALLDIR update html epub MAHARA=1.8 >> $LOGFILE 2>&1 -make -C $INSTALLDIR update html epub MAHARA=1.9 >> $LOGFILE 2>&1 -make -C $INSTALLDIR update html epub MAHARA=1.10 >> $LOGFILE 2>&1 -make -C $INSTALLDIR update html epub MAHARA=15.04 >> $LOGFILE 2>&1 -make -C $INSTALLDIR update html epub MAHARA=15.10 >> $LOGFILE 2>&1 + +# Move old versions to the monthly cron in /etc/cron.monthly/ make -C $INSTALLDIR update html epub MAHARA=16.04 >> $LOGFILE 2>&1 make -C $INSTALLDIR update html epub MAHARA=16.10 >> $LOGFILE 2>&1 diff --git a/maharadocs-1.7/debian/maharadocs.cron.monthly b/maharadocs-1.7/debian/maharadocs.cron.monthly new file mode 100755 index 0000000..a952f15 --- /dev/null +++ b/maharadocs-1.7/debian/maharadocs.cron.monthly @@ -0,0 +1,31 @@ +#!/bin/bash +set -e +export DEBIAN_FRONTEND=noninteractive +. /usr/share/debconf/confmodule +PACKAGE=`basename $0 .postinst` + +db_get maharadocs/installdir +INSTALLDIR=$RET +db_get maharadocs/logdir +LOGDIR=$RET +LOGFILE=${LOGDIR}/update.log + +cd $INSTALLDIR + +# Add a useful timestamp +echo ==================================== >> $LOGFILE +echo Monthly run >> $LOGFILE +date '+%Y-%m-%d %H:%M:%S %Z' >> $LOGFILE +echo ==================================== >> $LOGFILE + +git pull >> $LOGFILE + +make -C $INSTALLDIR update html epub MAHARA=1.4 >> $LOGFILE 2>&1 +make -C $INSTALLDIR update html epub MAHARA=1.5 >> $LOGFILE 2>&1 +make -C $INSTALLDIR update html epub MAHARA=1.6 >> $LOGFILE 2>&1 +make -C $INSTALLDIR update html epub MAHARA=1.7 >> $LOGFILE 2>&1 +make -C $INSTALLDIR update html epub MAHARA=1.8 >> $LOGFILE 2>&1 +make -C $INSTALLDIR update html epub MAHARA=1.9 >> $LOGFILE 2>&1 +make -C $INSTALLDIR update html epub MAHARA=1.10 >> $LOGFILE 2>&1 +make -C $INSTALLDIR update html epub MAHARA=15.04 >> $LOGFILE 2>&1 +make -C $INSTALLDIR update html epub MAHARA=15.10 >> $LOGFILE 2>&1 -- GitLab From b70ffc5a873cd1c2419a06e135f20c1c73661782 Mon Sep 17 00:00:00 2001 From: Jonathan Harker Date: Thu, 13 Oct 2016 12:58:10 +1300 Subject: [PATCH 2/2] Bump packaging version to 16.10-1 --- maharadocs-1.7/debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/maharadocs-1.7/debian/changelog b/maharadocs-1.7/debian/changelog index 1e8e8d9..2135312 100644 --- a/maharadocs-1.7/debian/changelog +++ b/maharadocs-1.7/debian/changelog @@ -1,3 +1,11 @@ +maharadocs (16.10-1) stable; urgency=medium + + * Move old versions of manuals from daily to monthly cron. + * New cron job in /etc/cron.monthly to build old versions. + * Adds a timestamp to the log. + + -- Jonathan Harker Thu, 13 Oct 2016 12:57:31 +1300 + maharadocs (15.04-4) stable; urgency=medium * Adding generation for 15.10 -- GitLab