From: Christian G. [M. Mitch] <mas...@us...> - 2002-11-11 19:14:48
|
Update of /cvsroot/jprojecttimer/jprojecttimer In directory usw-pr-cvs1:/tmp/cvs-serv12516 Added Files: buildPackages.sh Log Message: Initial revision. This is a shell script to automate package build of arbitrary versions of JProjectTimer. Automatically builds .zip, .tar.gz and -src.tar.gz. Can build older versions as well and is independent of your currently checked out version (does an extra check out to the desired version). --- NEW FILE: buildPackages.sh --- #!/bin/sh # $Id: buildPackages.sh,v 1.1 2002/11/11 19:14:43 mastermitch Exp $ # Use this script to generate new file releases of JProjectTimer. It # will build the .tar.gz and .zip binary packages as well as a # -src.tar.gz source archive. # Pass the version number to build as a commandline parameter # (e.g. "0.0.7"). # Be sure that all files are properly tagged in CVS (e.g. "v0_0_7"). # This script will do a fresh checkout of all files in a temporary # directory. # Example for version 0.0.7: # # * CVS tag the current code with the version tag "v0_0_7" # =>> DON'T DO THIS TWICE WHEN THIS TAG IS ALREADY IN USE! <<= # # * run "./buildPackages.sh 0.0.7" # # * you will get: # - JProjectTimer-0.0.7.tar.gz # - JProjectTimer-0.0.7.zip # - JProjectTimer-0.0.7-src.tar.gz # ToDo: # - allow package build with a date instead of a version tag (or # something like "current") VERSION=$1 if [ -z "$VERSION" ] ; then echo "$0: no version number given!" exit 1 fi REVISION="v$(echo $VERSION|sed s/\\./_/g)" DIR=JProjectTimer-$VERSION SRCFILE=JProjectTimer-$VERSION-src.tar.gz TGZFILE=JProjectTimer-$VERSION.tar.gz ZIPFILE=JProjectTimer-$VERSION.zip echo "version number is $VERSION" echo "CVS tag is $REVISION" # don't use this directory name for anything else! rm -rf buildPackages.tmp mkdir buildPackages.tmp cd buildPackages.tmp echo "login to CVS" echo "press enter on password prompt" cvs -d:pserver:ano...@cv...:/cvsroot/jprojecttimer login echo "exporting source code..." cvs -z3 -d:pserver:ano...@cv...:/cvsroot/jprojecttimer export -r $REVISION -d $DIR jprojecttimer echo "building source archive" tar -c $DIR -zvf $SRCFILE echo "renaming source directory" mv $DIR source echo "building JProjectTimer .jar" cd source ant jar cd .. echo "building binary packages" mkdir $DIR while read FILE; do echo "copying $FILE" cp source/$FILE $DIR done <<EOF JProjectTimer-0.0.7.jar README Changelog lib/jdom.jar lib/jdom.license lib/xerces.jar lib/xerces.license EOF echo "building .tar.gz" tar -c $DIR -zvf $TGZFILE echo "building .zip" zip -r $ZIPFILE $DIR echo "cleaning up" rm -rf source rm -rf $DIR echo "these files have been generated in ./buildPackages.tmp:" ls -l |