[pLog-svn] r3635 - plog/trunk/bin-devel
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Jun 22 18:36:33 GMT 2006
Author: oscar
Date: 2006-06-22 18:36:32 +0000 (Thu, 22 Jun 2006)
New Revision: 3635
Added:
plog/trunk/bin-devel/build-templates-nightly.sh
plog/trunk/bin-devel/build-templates.sh
Log:
templates are now also build nightly
Added: plog/trunk/bin-devel/build-templates-nightly.sh
===================================================================
--- plog/trunk/bin-devel/build-templates-nightly.sh 2006-06-22 18:29:19 UTC (rev 3634)
+++ plog/trunk/bin-devel/build-templates-nightly.sh 2006-06-22 18:36:32 UTC (rev 3635)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# check parameters
+if [ $# -lt 2 ]; then
+ echo "Generates a build of all templates and moves it to the specified folder"
+ echo ""
+ echo "Usage: build-templates-nightly.sh label destination-folder"
+ echo ""
+ exit -1
+fi
+
+echo "*** Build templates: starting process ***"
+date
+echo "***"
+
+SVNTAG=$1
+DESTFOLDER=$2
+BINPATH=/home/oscar/plog-devel/bin-devel
+
+pwd
+echo $DESTFOLDER
+echo $SVNTAG
+
+# make the package
+cd $BINPATH
+$BINPATH/build-templates.sh $SVNTAG
+
+# move the file to the destination folder
+PACKAGENAME=lifetype-templates-`date +%Y%m%d`
+mv -f $BINPATH/$PACKAGENAME.zip $DESTFOLDER
+
+# remove everything else
+rm -f $BINPATH/$PACKAGENAME.zip
+rm -f $BINPATH/$PACKAGENAME.tar.gz
+rm -f $BINPATH/$PACKAGENAME.tar.bz2
+
+# make the softlink
+rm $DESTFOLDER/lifetype-templates-latest.zip
+ln -s $DESTFOLDER/$PACKAGENAME.zip $DESTFOLDER/lifetype-templates-latest.zip
+
+echo "*** Build: Nightly build complete!"
+echo "*** Build: build result available in $DESTFOLDER/$PACKAGENAME.zip"
Property changes on: plog/trunk/bin-devel/build-templates-nightly.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: plog/trunk/bin-devel/build-templates.sh
===================================================================
--- plog/trunk/bin-devel/build-templates.sh 2006-06-22 18:29:19 UTC (rev 3634)
+++ plog/trunk/bin-devel/build-templates.sh 2006-06-22 18:36:32 UTC (rev 3635)
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+#
+# server and repository path
+#
+SVNSERVER=http://devel.lifetype.net
+SVNREPO=/svn/plog/templates/
+
+#
+# folders that should not be included. Please add here any plugin that should be removed from
+# the final package!
+#
+DONOTINCLUDE="bin/ unported/ base/"
+
+#
+# helper functions to print things in different colors
+#
+NOCOLOR='\e[0m'
+message()
+{
+ echo -e "\033[01;32m$*$NOCOLOR"
+}
+
+warning()
+{
+ echo -e "\033[01;33m$*$NOCOLOR"
+}
+
+error()
+{
+ echo -e "\033[01;31m$*$NOCOLOR"
+}
+
+cleanup_exit()
+{
+ rm -rf $WORKDIR
+ rm -rf $WORKDIR-docs
+ exit $1
+}
+
+# check parameters
+if [ $# -lt 1 ]; then
+ echo "Makes a build off the latest SVN source code and packages it"
+ echo ""
+ echo "Usage: build-templates.sh label package-name"
+ echo ""
+ echo "If package-name is omitted, the name will plog-plugins-current_date"
+ exit -1
+fi
+
+SVNTAG=$1
+
+# if there was no package name parameter, then build one using the current date
+if [ $# -eq 1 ]; then
+ PACKAGENAME=lifetype-templates-`date +%Y%m%d`
+else
+ PACKAGENAME=$2
+fi
+
+message "Using $PACKAGENAME as the package name"
+WORKDIR=$PACKAGENAME
+BUILDLABEL=$PACKAGENAME
+
+# call the cvs command with the correct parameters
+message "Fetching the templates using $SVNTAG label..."
+svn checkout $SVNSERVER$SVNREPO/$SVNTAG $WORKDIR
+
+if [ $? -eq 1 ]; then
+ echo "There was an error fetching the templates from the repository. Please try again."
+ exit 1
+fi
+
+# remove all the annoying SVN/ folders
+message "Removing unneeded SVN folders..."
+find $WORKDIR/ -name ".svn" -exec rm -rf '{}' \; >& /dev/null
+
+# and remove all unnecessary files
+message "Removing unnecessary files...";
+for i in $DONOTINCLUDE
+do
+ message " -- removing $i"
+ rm -rf $WORKDIR/$i
+done
+
+# and create the tar.gz and .tar.bz2 packages
+message "Creating .zip package..."
+zip -r $BUILDLABEL.zip $WORKDIR > /dev/null
+message "Creating .tar.gz package..."
+tar czvf $BUILDLABEL.tar.gz $WORKDIR > /dev/null
+message "Creating .tar.bz2 package..."
+tar cjvf $BUILDLABEL.tar.bz2 $WORKDIR > /dev/null
+
+# remove all the annoying CVS/ folders
+message "Removing unneeded folders..."
+find $WORKDIR/ -name ".svn" -exec rm -rf '{}' \; >& /dev/null
+find $WORKDIR/ -name ".DS_Store" -exec rm -rf '{}' \; >& /dev/null
+
+message "Done!"
+
+cleanup_exit -1
Property changes on: plog/trunk/bin-devel/build-templates.sh
___________________________________________________________________
Name: svn:executable
+ *
More information about the pLog-svn
mailing list