You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2005/11/21 20:32:34 UTC

svn commit: r347960 - in /spamassassin/trunk/build/nightlymc: ./ README corpora_runs crontab.txt extract_to_rsync_dir

Author: jm
Date: Mon Nov 21 11:32:31 2005
New Revision: 347960

URL: http://svn.apache.org/viewcvs?rev=347960&view=rev
Log:
add 'release' crontab scripts to SVN

Added:
    spamassassin/trunk/build/nightlymc/
    spamassassin/trunk/build/nightlymc/README
    spamassassin/trunk/build/nightlymc/corpora_runs   (with props)
    spamassassin/trunk/build/nightlymc/crontab.txt
    spamassassin/trunk/build/nightlymc/extract_to_rsync_dir   (with props)

Added: spamassassin/trunk/build/nightlymc/README
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/build/nightlymc/README?rev=347960&view=auto
==============================================================================
--- spamassassin/trunk/build/nightlymc/README (added)
+++ spamassassin/trunk/build/nightlymc/README Mon Nov 21 11:32:31 2005
@@ -0,0 +1,5 @@
+
+These files are run by uid "release" on "spamassassin.zones.apache.org",
+from cron, in order to tag nightly and weekly mass-check revisions
+and build copies of the source tree for those revs.
+

Added: spamassassin/trunk/build/nightlymc/corpora_runs
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/build/nightlymc/corpora_runs?rev=347960&view=auto
==============================================================================
--- spamassassin/trunk/build/nightlymc/corpora_runs (added)
+++ spamassassin/trunk/build/nightlymc/corpora_runs Mon Nov 21 11:32:31 2005
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Cron script for "release".  see "build/nightlymc/crontab.txt"
+
+TZ=UTC; export TZ
+DIR=$HOME/versions/cvshead
+SVN=/opt/subversion-1.1.4/bin/svn
+SVNVERS=/opt/subversion-1.1.4/bin/svnversion
+
+if [ ! -d $DIR ]; then
+  echo "Whaaaa?!?  No directory?" >&2
+  exit 2
+fi
+
+cd $DIR
+$SVN update > /dev/null
+if [ $? -ne 0 ]; then
+  echo "Problem doing svn update" >&2
+  exit 1
+fi
+
+RREV=`$SVNVERS .`
+REV=`echo $RREV | awk -F: '{print $1}' | tr -cd '[0-9]'`
+DATE=`date "+%Y-%m-%d"`
+
+# If there's something awkward about the rev number, alert!
+if [ "$RREV" != "$REV" ]; then
+  echo "'$RREV' and '$REV' aren't equal!" >&2
+  exit 1
+fi
+
+echo "$DATE\t$REV"

Propchange: spamassassin/trunk/build/nightlymc/corpora_runs
------------------------------------------------------------------------------
    svn:executable = *

Added: spamassassin/trunk/build/nightlymc/crontab.txt
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/build/nightlymc/crontab.txt?rev=347960&view=auto
==============================================================================
--- spamassassin/trunk/build/nightlymc/crontab.txt (added)
+++ spamassassin/trunk/build/nightlymc/crontab.txt Mon Nov 21 11:32:31 2005
@@ -0,0 +1,8 @@
+# sudo crontab -e release:
+
+# Remember, we're in GMT here ...
+50 8 * * 0-5 $HOME/script_svn/build/nightlymc/corpora_runs >> /home/corpus-rsync/corpus/nightly-versions.txt
+53 8 * * 0-5 $HOME/script_svn/build/nightlymc/extract_to_rsync_dir nightly /home/corpus-rsync/corpus/nightly-versions.txt > $HOME/extract.log 2>&1
+50 8 * * 6 $HOME/script_svn/build/nightlymc/corpora_runs >> /home/corpus-rsync/corpus/weekly-versions.txt
+53 8 * * 6 $HOME/script_svn/build/nightlymc/extract_to_rsync_dir weekly /home/corpus-rsync/corpus/weekly-versions.txt > $HOME/extract.log 2>&1
+

Added: spamassassin/trunk/build/nightlymc/extract_to_rsync_dir
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/build/nightlymc/extract_to_rsync_dir?rev=347960&view=auto
==============================================================================
--- spamassassin/trunk/build/nightlymc/extract_to_rsync_dir (added)
+++ spamassassin/trunk/build/nightlymc/extract_to_rsync_dir Mon Nov 21 11:32:31 2005
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# Cron script for "release".  See "build/nightlymc/crontab.txt"
+
+RSYNC_DIR=/home/corpus-rsync/tagged_builds
+REPO_URL=http://svn.apache.org/repos/asf/spamassassin/trunk
+
+SVN=/opt/subversion-1.1.4/bin/svn
+
+type="$1"
+versfile="$2"
+
+if [ -z "$type" ]; then
+  echo "Type not specified" >&2
+  exit 1
+fi
+
+if [ ! -f $versfile ]; then
+  echo "Version file not specified" >&2
+  exit 1
+fi
+
+subdir=${type}_mass_check
+
+echo "Type: $type"
+echo "Version File: $versfile"
+echo "Subdir: $subdir"
+
+REV=`tail -1 $versfile | awk '{print $2}'`
+
+echo "Revision: $REV"
+
+rm -rf $RSYNC_DIR/$subdir
+echo Command: $SVN export --non-interactive -r $REV $REPO_URL $RSYNC_DIR/$subdir
+$SVN export --non-interactive -r $REV $REPO_URL $RSYNC_DIR/$subdir
+

Propchange: spamassassin/trunk/build/nightlymc/extract_to_rsync_dir
------------------------------------------------------------------------------
    svn:executable = *