Skip to content
Snippets Groups Projects
Commit e1a739dd authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman :boom:
Browse files

moved the trunk distribution script to the java_dann-1.x branch

git-svn-id: svn://svn.syncleus.com/dANN/branches/java_dann-1.x@328 6ae8b97b-f314-0410-8212-aecf10b92ded
parent 1d9afa23
No related branches found
No related tags found
No related merge requests found
#!/bin/sh #!/bin/sh
#check to make sure it has an argument if hash svn2cl 2> /dev/null; then
echo "svn2cl found, good..."
else
echo "svn2cl must be on your path"
exit 1
fi
if hash svn 2> /dev/null; then
echo "svn found, good..."
else
echo "svn must be on your path"
exit 1
fi
if hash tar 2> /dev/null; then
echo "tar found, good..."
else
echo "tar must be on your path"
exit 1
fi
if hash ant 2> /dev/null; then
echo "ant found, good..."
else
echo "ant must be on your path"
exit 1
fi
if hash rm 2> /dev/null; then
echo "rm found, good..."
else
echo "rm must be on your path"
exit 1
fi
#pull the arguments
if [ $# -lt 3 ]
then
ARCH_NAME="java_dann-trunk"
SVN_ROOT="trunk/projects"
else
if [ $# -lt 4 ]
then
ARCH_NAME=$3
SVN_ROOT="tags/$ARCH_NAME"
else
ARCH_NAME=$4
SVN_ROOT="$3/$ARCH_NAME"
fi
fi
if [ $# -lt 2 ]
then
REV=HEAD
else
REV=$2
fi
if [ $# -lt 1 ] if [ $# -lt 1 ]
then then
echo "must specify the directory in tags to package for distribution." echo "usage: $0 <output dir> [revision] [tags|branches] [tag/branch name]"
exit 1 exit 1
else
OUT_DIR=$1
fi fi
SVN_URL="svn://svn.syncleus.com/dANN"
#check out tag #check out tag
svn co svn://svn.syncleus.com/dANN/tags/$1 ./tmp/$1-co svn co -r $REV $SVN_URL/$SVN_ROOT ./tmp/$ARCH_NAME-co
svn export svn://svn.syncleus.com/dANN/tags/$1 ./tmp/$1 svn export -r $REV $SVN_URL/$SVN_ROOT ./tmp/$ARCH_NAME
#Generate ChangeLog #Generate ChangeLog
svn2cl -i --group-by-day --authors authors.xml -o ./tmp/$1/java_dann/doc/ChangeLog ./tmp/$1-co/java_dann svn2cl -i --group-by-day --authors authors.xml -o ./tmp/$ARCH_NAME/java_dann/doc/ChangeLog ./tmp/$ARCH_NAME-co/java_dann
svn2cl -i --group-by-day --authors authors.xml -o ./tmp/$1/java_dann_examples/doc/ChangeLog ./tmp/$1-co/java_dann_examples svn2cl -i --group-by-day --authors authors.xml -o ./tmp/$ARCH_NAME/java_dann_examples/doc/ChangeLog ./tmp/$ARCH_NAME-co/java_dann_examples
# tarball source distribution # tarball source distribution
tar -czvf $1-src.tar.gz -C ./tmp/ $1 tar -czvf $OUT_DIR/$ARCH_NAME-src.tar.gz -C ./tmp/ $ARCH_NAME
#remove dist dir for binary distribution #remove dist dir for binary distribution
rm -rf ./tmp/$1/dist rm -rf ./tmp/$ARCH_NAME/dist
#compile core library #compile core library
ant -buildfile ./tmp/$1/java_dann/build.xml build-all javadoc ant -buildfile ./tmp/$ARCH_NAME/java_dann/build.xml build-all javadoc
#clean core library to include only files for binary distribution #clean core library to include only files for binary distribution
rm -rf ./tmp/$1/java_dann/src rm -rf ./tmp/$ARCH_NAME/java_dann/src
rm -rf ./tmp/$1/java_dann/build/classes rm -rf ./tmp/$ARCH_NAME/java_dann/build/classes
rm -rf ./tmp/$1/java_dann/build/coverage rm -rf ./tmp/$ARCH_NAME/java_dann/build/coverage
rm -rf ./tmp/$1/java_dann/build/tests rm -rf ./tmp/$ARCH_NAME/java_dann/build/tests
rm -f ./tmp/$1/java_dann/cobertura.ser rm -f ./tmp/$ARCH_NAME/java_dann/cobertura.ser
#compile examples application #compile examples application
ant -buildfile ./tmp/$1/java_dann_examples/build.xml all ant -buildfile ./tmp/$ARCH_NAME/java_dann_examples/build.xml all
#clean examples application to include only files for binary distribution #clean examples application to include only files for binary distribution
rm -rf ./tmp/%1/java_dann_examples/src rm -rf ./tmp/$ARCH_NAME/java_dann_examples/src
rm -rf ./tmp/%1/java_dann_examples/build/classes rm -rf ./tmp/$ARCH_NAME/java_dann_examples/build/classes
# tarball binary distribution # tarball binary distribution
tar -czvf $1-bin.tar.gz -C ./tmp/ $1 tar -czvf $OUT_DIR/$ARCH_NAME-bin.tar.gz -C ./tmp/ $ARCH_NAME
# tarball javadocs
tar -czvf $OUT_DIR/$ARCH_NAME-javadoc.tar.gz -C ./tmp/$ARCH_NAME/java_dann/build/ javadoc/
#remove tmp directory #remove tmp directory
rm -rf ./tmp rm -rf ./tmp
exit 0 #exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment