[pLog-svn] r6769 - templates/branches/lifetype-1.2/bin
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Mon Dec 22 13:18:17 EST 2008
Author: oscar
Date: 2008-12-22 13:18:17 -0500 (Mon, 22 Dec 2008)
New Revision: 6769
Added:
templates/branches/lifetype-1.2/bin/build-all-svn.sh
templates/branches/lifetype-1.2/bin/build-local.sh
templates/branches/lifetype-1.2/bin/build-nightly.sh
Removed:
templates/branches/lifetype-1.2/bin/build-templates-nightly.sh
templates/branches/lifetype-1.2/bin/build.sh
Log:
copied everything from plugins directory
Copied: templates/branches/lifetype-1.2/bin/build-all-svn.sh (from rev 6766, plugins/branches/lifetype-1.2/bin/build-all-svn.sh)
===================================================================
--- templates/branches/lifetype-1.2/bin/build-all-svn.sh (rev 0)
+++ templates/branches/lifetype-1.2/bin/build-all-svn.sh 2008-12-22 18:18:17 UTC (rev 6769)
@@ -0,0 +1,110 @@
+
+#!/bin/bash
+
+# Script to generate distribution builds of LifeType
+#
+# (c) 27-08-2004, the LifeType Team
+#
+#
+# Requires two parameters: the name of the output package and the
+# CVS tag label that will be used to fetch the contents of the build. Therefore,
+# contents must be tagged _before_ running this script.
+# The same CVS label must be used for both the plog_devel and plog_docs module.
+#
+
+#
+# server and repository path
+#
+SVNSERVER=http://devel.lifetype.net
+SVNREPO=/svn/plog/templates
+
+#
+# array with the files that we are going to remove before
+# making the package... Wildcards, complete paths, whatever
+# can be used here
+# NOTE: When changing this list, update the list in build-diff.sh as well
+
+TOREMOVE="unported/ bin/"
+
+#
+# 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"
+}
+
+# check parameters
+if [ $# -lt 1 ]; then
+ echo "Makes a build off the latest SVN source code and packages it"
+ echo ""
+ echo "Usage: $0 label package-name"
+ echo ""
+ echo "If package-name is omitted, the name will be lifetype-templates-<current_date>"
+ echo ""
+ echo "Use HEAD or TRUNK to indicate the main development branch"
+ echo ""
+ echo "Example:"
+ echo ""
+ echo " $0 branches/lifetype-1.2 lifetype-1.2"
+ 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=`basename $PACKAGENAME`
+BUILDLABEL=`basename $PACKAGENAME`
+
+# determine whether code should be fetched from
+# plog/trunk or plog/tags/xxxx
+if [ $SVNTAG == "HEAD" -o $SVNTAG == "TRUNK" -o $SVNTAG == "head" -o $SVNTAG == "trunk" ]; then
+ SVNREPO=${SVNREPO}/trunk
+else
+ SVNREPO=${SVNREPO}/${SVNTAG}
+fi
+
+# call the svn command with the correct parameters
+message "Fetching the source code using $SVNTAG label..."
+REV=`svn export $SVNSERVER$SVNREPO $WORKDIR | tail -n 1 | awk '{print $NF}' | tr -d . `
+if [ $? -eq 1 ]; then
+ echo "There was an error fetching the source code. Please try again."
+ exit 1
+fi
+
+# and remove all unnecessary files
+message "Removing unnecessary files...";
+for i in $TOREMOVE
+do
+ echo " -- removing $i"
+ rm -rf $WORKDIR/$i
+done
+
+# and create the .zip, tar.gz and .tar.bz2 packages
+message "Creating .zip package..."
+zip $BUILDLABEL.zip -r $WORKDIR > /dev/null
+
+# clean up the temporary folders
+message "Cleaning up..."
+rm -rf $WORKDIR
+
+# done!
+message "Done!"
Copied: templates/branches/lifetype-1.2/bin/build-local.sh (from rev 6765, plugins/branches/lifetype-1.2/bin/build-local.sh)
===================================================================
--- templates/branches/lifetype-1.2/bin/build-local.sh (rev 0)
+++ templates/branches/lifetype-1.2/bin/build-local.sh 2008-12-22 18:18:17 UTC (rev 6769)
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+set -e
+set -u
+
+#
+# Script to generate distribution builds of LifeType
+#
+# (c) 27-08-2004, the LifeType Team
+
+#
+# array with the files that we are going to remove before
+# making the package... Wildcards, complete paths, whatever
+# can be used here
+#
+TOREMOVE="unported/ bin/"
+WORKFOLDER="/tmp/"
+
+#sourceforge wants all unique filenames. So
+# we code them with a version number. ugh.
+VERSION="1.2"
+
+#
+# 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"
+}
+
+# check parameters
+if [ $# -lt 1 ]; then
+ echo "Makes a zip package of a given template"
+ echo ""
+ echo "Usage: $0 [noupload] <plugin name>"
+ echo ""
+ echo "Use 'all' in order to generate a package of all the templates"
+ exit -1
+fi
+
+# get the name of the plugin that we're trying to build
+if [ "${1:-}" == "noupload" ]; then
+ message "Building, not uploading";
+ UPLOAD=""
+ TEMPLATENAME=$2
+else
+ message "Building and uploading, please type your sourceforge username"
+ read UPLOAD
+ if [ "${UPLOAD:-}" == "" ]; then
+ error "A sourceforge username is required to upload, or else use 'noupload'."
+ exit
+ fi
+ TEMPLATENAME=$1
+fi
+
+# a temporary working folder like any other...
+TMPFOLDER=${WORKFOLDER}`date | md5`
+CURFOLDER=`pwd`
+
+# export the current folder
+message "Exporting folder..."
+svn export . $TMPFOLDER
+
+# remove whatever we don't need
+message "Removing unnecessary files...";
+for i in ${TOREMOVE}
+do
+ message " -- removing $i"
+ rm -rf ${TMPFOLDER}/$i
+done
+
+# build the correct template package, or all of them if that's what we were requested to do...
+cd $TMPFOLDER
+message "Creating ZIP package..."
+if [ $TEMPLATENAME == "all" ]; then
+ TEMPLATENAME=all_templates
+ zip -qr ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip .
+else
+ zip -r ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip $TEMPLATENAME
+fi
+
+if [ "$UPLOAD" != "" ]; then
+ # upload the package. Linux ftp (at least my version,
+ # doesn't have the -a command,
+ # but I can use curl to do the same thing.
+ if [ `uname` == "Linux" ]; then
+ curl --upload-file ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip -u $UPLOAD sftp://frs.sourceforge.net/~/uploads/
+ else
+# I think only oscar used this - he'll need to fix it
+# ftp -a -u ftp://upload.sourceforge.net/incoming/${VERSION}_${TEMPLATENAME}.zip ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip
+ echo "fix me. Sourceforge changed how they do uploads"
+ fi
+fi
+
+message "Done!"
+
+# cleanup
+rm -rf $TMPFOLDER
Copied: templates/branches/lifetype-1.2/bin/build-nightly.sh (from rev 6767, plugins/branches/lifetype-1.2/bin/build-nightly.sh)
===================================================================
--- templates/branches/lifetype-1.2/bin/build-nightly.sh (rev 0)
+++ templates/branches/lifetype-1.2/bin/build-nightly.sh 2008-12-22 18:18:17 UTC (rev 6769)
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+set -e
+set -u
+
+# check parameters
+if [ $# -lt 2 ]; then
+ echo "Generates a build of all templates and moves it to the specified folder"
+ echo ""
+ echo "Usage: $0 label destination-folder"
+ echo ""
+ echo "Use HEAD or TRUNK to indicate the main development branch"
+ echo ""
+ echo "Example:"
+ echo ""
+ echo " $0 branches/lifetype-1.2 lifetype-1.2"
+ echo " $0 TRUNK lifetype-trunk"
+ exit -1
+fi
+
+SVNTAG=$1
+DESTFOLDER=$2
+BINPATH=`dirname $0`
+if [ ${BINPATH:0:1} != "/" ]; then
+ BINPATH=`pwd`/$BINPATH
+fi
+PACKAGENAME=lifetype-templates-`date +%Y%m%d`
+
+echo "*** Build: starting process for $SVNTAG ***"
+echo "Destination: $DESTFOLDER"
+date
+echo "***"
+
+mkdir -p $DESTFOLDER
+pushd $DESTFOLDER > /dev/null
+$BINPATH/build-all-svn.sh $SVNTAG $PACKAGENAME
+
+# make the softlink
+rm -f lifetype-templates-latest.zip
+ln -s $PACKAGENAME.zip lifetype-templates-latest.zip
+popd > /dev/null
+
+echo "*** Build: Nightly build complete!"
+echo "*** Build: build result available in $DESTFOLDER/$PACKAGENAME.zip"
Deleted: templates/branches/lifetype-1.2/bin/build-templates-nightly.sh
===================================================================
--- templates/branches/lifetype-1.2/bin/build-templates-nightly.sh 2008-12-22 18:16:38 UTC (rev 6768)
+++ templates/branches/lifetype-1.2/bin/build-templates-nightly.sh 2008-12-22 18:18:17 UTC (rev 6769)
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-set -e
-set -u
-
-# 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=`dirname $0`
-PACKAGENAME=lifetype-templates-`date +%Y%m%d`
-
-pwd
-echo $DESTFOLDER
-echo $SVNTAG
-
-# make the package
-pushd $DESTFOLDER
-$BINPATH/build-templates.sh $SVNTAG $PACKAGENAME
-
-# move the file to the destination folder
-
-# remove everything else
-rm $PACKAGENAME.tar.gz
-rm $PACKAGENAME.tar.bz2
-
-# todo: diff today's build to the latest, and erase it if nothing has changed
-
-# 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"
-
-popd > /dev/null
Deleted: templates/branches/lifetype-1.2/bin/build.sh
===================================================================
--- templates/branches/lifetype-1.2/bin/build.sh 2008-12-22 18:16:38 UTC (rev 6768)
+++ templates/branches/lifetype-1.2/bin/build.sh 2008-12-22 18:18:17 UTC (rev 6769)
@@ -1,105 +0,0 @@
-#!/bin/sh
-
-#
-# Script to generate distribution builds of LifeType
-# (c) 27-08-2004, the LifeType Team
-
-#
-# array with the files that we are going to remove before
-# making the package... Wildcards, complete paths, whatever
-# can be used here
-#
-TOREMOVE="unported/ bin/ newtemplates/"
-WORKFOLDER="/tmp/"
-
-#sourceforge wants all unique filenames. So
-# we code them with a version number. ugh.
-VERSION="1.2"
-
-#
-# 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"
-}
-
-# check parameters
-if [ $# -lt 1 ]; then
- echo "Makes a zip package of a given template folder"
- echo ""
- echo "Usage: build.sh [noupload] template"
- echo ""
- echo "Use 'all' in order to generate a package of all the template sets"
- exit -1
-fi
-
-
-# get the name of the template that we're trying to build
-if [ "${1:-}" == "noupload" ]; then
- message "Building, not uploading";
- UPLOAD=""
- TEMPLATENAME=$2
-else
- message "Building and uploading, please type your sourceforge username"
- read UPLOAD
- if [ "${UPLOAD:-}" == "" ]; then
- error "A sourceforge username is required to upload, or else use 'noupload'."
- exit
- fi
- TEMPLATENAME=$1
-fi
-
-# a temporary working folder like any other...
-TMPFOLDER=${WORKFOLDER}`date | md5`
-CURFOLDER=`pwd`
-
-# export the current folder
-message "Exporting folder..."
-svn export . $TMPFOLDER
-
-# remove whatever we don't need
-message "Removing unnecessary files...";
-for i in ${TOREMOVE}
-do
- message " -- removing $i"
- rm -rf ${TMPFOLDER}/$i
-done
-
-# build the correct template package, or all of them if that's what we were requested to do...
-cd $TMPFOLDER
-message "Creating ZIP package..."
-if [ $TEMPLATENAME == "all" ]; then
- TEMPLATENAME=_all_templates
- zip -qr ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip .
-else
- zip -r ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip ${TEMPLATENAME}/
-fi
-
-if [ "$UPLOAD" != "" ]; then
- # upload the package. Linux ftp (at least my version, doesn't have the -a command,
- # but I can use curl to do the same thing.
- if [ `uname` == "Linux" ]; then
- curl --upload-file ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip -u $UPLOAD sftp://frs.sourceforge.net/~/uploads/
- else
-# I think only oscar used this - he'll need to fix it
-# ftp -a -u ftp://upload.sourceforge.net/incoming/${VERSION}_${TEMPLATENAME}.zip ${CURFOLDER}/${VERSION}_${TEMPLATENAME}.zip
- echo "fix me. Sourceforge changed how they do uploads"
- fi
-fi
-
-message "Done!"
-
-# cleanup
-rm -rf $TMPFOLDER
More information about the pLog-svn
mailing list