[geeklog-cvs] tools: Added project.geeklog.net cronjobs

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Mar 8 13:26:58 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c50d62875764
changeset: 26:c50d62875764
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun Mar 08 18:26:17 2009 +0100
description:
Added project.geeklog.net cronjobs

diffstat:

5 files changed, 115 insertions(+), 1 deletion(-)
README              |    2 -
cronjobs/README     |    8 ++++
cronjobs/nightly.sh |   84 +++++++++++++++++++++++++++++++++++++++++++++++++++
cronjobs/phpdoc.sh  |   21 ++++++++++++
ship/mkdist.sh      |    1 

diffs (142 lines):

diff -r 22efede3ca2f -r c50d62875764 README
--- a/README	Sat Mar 07 15:40:54 2009 +0100
+++ b/README	Sun Mar 08 18:26:17 2009 +0100
@@ -1,1 +1,1 @@
-A collection of tools for development and deployment of Geeklog 1.x
+A collection of tools for development and deployment of Geeklog
diff -r 22efede3ca2f -r c50d62875764 cronjobs/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cronjobs/README	Sun Mar 08 18:26:17 2009 +0100
@@ -0,0 +1,8 @@
+These are the bash scripts that run from cronjobs on project.geeklog.net:
+
+- nightly.sh -- creates the nightly tarball at
+                http://project.geeklog.net/nightly/geeklog-nightly.tar.gz
+
+- phpdoc.sh  -- updates the phpDocumentor documentation of the Geeklog source
+                code at http://project.geeklog.net/src/
+
diff -r 22efede3ca2f -r c50d62875764 cronjobs/nightly.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cronjobs/nightly.sh	Sun Mar 08 18:26:17 2009 +0100
@@ -0,0 +1,84 @@
+#!/usr/local/bin/bash
+#
+# nightly.sh - create nightly tarball for Geeklog
+#
+# Also see the mkdist.sh script - some pieces have been copied from there.
+#
+# To be called from a cronjob, hence the use of complete paths in some places.
+
+# do this once:
+# mkdir /usr/home/geeklog2/nightly
+# cd /usr/home/geeklog2/nightly
+# hg clone http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/ geeklog
+
+cd /usr/home/geeklog2/nightly/geeklog-nightly
+
+# update repository
+/usr/local/bin/hg -q pull > /dev/null 2>&1
+/usr/local/bin/hg -q up > /dev/null 2>&1
+
+# fix config names
+mv db-config.php.dist db-config.php
+mv public_html/siteconfig.php.dist public_html/siteconfig.php
+
+# add PEAR classes
+cd system/pear
+cp /usr/www/users/geeklog2/www/nightly/geeklog-pear.tar.gz .
+tar xfz geeklog-pear.tar.gz
+rm -f geeklog-pear.tar.gz
+cd ../..
+
+# remove unused files
+
+# Blaine's test file ...
+rm -f public_html/blaine.php
+
+# don't ship MT-Blacklist modules any more
+rm -f plugins/spamx/MTBlackList.Examine.class.php
+rm -f plugins/spamx/Import.Admin.class.php
+# only used by the Import class
+rm -rf plugins/spamx/magpierss
+rm -f plugins/spamx/rss.inc.php
+# you'd need to set up a honeypot to use it
+rm -f plugins/spamx/ProjectHoneyPot.Examine.class.php
+# about time we clean up the install directory ...
+rm -f public_html/admin/install/addindex.php
+rm -f system/lib-custom.php.dist
+
+# PEAR buildpackage files
+rm -f plugins/calendar/buildpackage.php
+rm -f plugins/links/buildpackage.php
+rm -f plugins/polls/buildpackage.php
+rm -f plugins/spamx/buildpackage.php
+rm -f plugins/staticpages/buildpackage.php
+rm -rf system/build
+
+# fix permissions
+find . -type f -exec chmod a-x \{\} \;
+chmod a+x emailgeeklogstories
+
+# set the default permissions
+chmod 775 backups
+chmod 775 data
+chmod 775 logs
+chmod 664 logs/*.log
+chmod 775 public_html/backend
+chmod 644 public_html/backend/*.rss
+chmod 775 public_html/images/articles
+chmod 664 public_html/images/articles/*
+chmod 775 public_html/images/topics
+chmod 664 public_html/images/topics/*
+chmod 775 public_html/images/userphotos
+chmod 664 public_html/images/userphotos/*
+
+cd ..
+
+tar cf geeklog-nightly.tar '--exclude=\.hg' geeklog-nightly
+gzip geeklog-nightly.tar
+
+# rename config files back to their names in the repository
+mv geeklog-nightly/db-config.php geeklog-nightly/db-config.php.dist
+mv geeklog-nightly/public_html/siteconfig.php geeklog-nightly/public_html/siteconfig.php.dist
+
+mv geeklog-nightly.tar.gz /usr/www/users/geeklog2/www/nightly/
+
diff -r 22efede3ca2f -r c50d62875764 cronjobs/phpdoc.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cronjobs/phpdoc.sh	Sun Mar 08 18:26:17 2009 +0100
@@ -0,0 +1,21 @@
+#!/usr/local/bin/bash
+#
+# phpdoc.sh - create phpDocumentor documentation from Geeklog's source code
+#
+# For use from a cronjob - you may want to leave out the "-q &" when calling
+# manually.
+
+# where to put the created documentation
+OUTPUT=/usr/www/users/geeklog2/www/src
+
+# path to Geeklog source code (e.g. a Mercurial repository)
+GL_PATH=/usr/home/geeklog2/nightly/geeklog-nightly
+
+# location of phpDocumentor
+PHPDOC_PATH=/usr/home/geeklog2/phpDocumentator
+
+# seems to help when called from a cronjob
+export PHP=/usr/local/bin/php
+
+$PHPDOC_PATH/phpdoc -t $OUTPUT -o HTML:Smarty:PHP -d $GL_PATH -i *language/*,system/build/,buildpackage.*,system/pear/,public_html/fckeditor/ -dc Geeklog -dn Geeklog -ti "Geeklog Source Code Documentation" -q &
+
diff -r 22efede3ca2f -r c50d62875764 ship/mkdist.sh
--- a/ship/mkdist.sh	Sat Mar 07 15:40:54 2009 +0100
+++ b/ship/mkdist.sh	Sun Mar 08 18:26:17 2009 +0100
@@ -55,6 +55,7 @@
 rm -f plugins/spamx/Import.Admin.class.php
 # only used by the Import class
 rm -rf plugins/spamx/magpierss
+rm -f plugins/spamx/rss.inc.php
 # you'd need to set up a honeypot to use it
 rm -f plugins/spamx/ProjectHoneyPot.Examine.class.php
 



More information about the geeklog-cvs mailing list