Skip to content

Commit

Permalink
Added shell script for packaging up the distribution for release. I g…
Browse files Browse the repository at this point in the history
…ave up doing it the Maven way - will revisit another day.
  • Loading branch information
joewalnes committed Sep 6, 2009
1 parent d52c09b commit 615ba89
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions package.sh
@@ -0,0 +1,43 @@
#!/bin/bash

# Placeholder release script until I can figure out how to get Maven to do all this. -joe

# To create a new release, update the version numbers below, then run ./package.sh. It will create the appropriate files in the release/ directory,
# suitable for distribution.
POM_VERSION=3.0.0-SNAPSHOT
RELEASE_VERSION=3.0-alpha-1

MODULES_TO_PACKAGE="sitemesh sitemesh-examples-* sitemesh-docs sitemesh-tools-benchmark"

mvn clean && mvn package

rm -rf release && mkdir release &&
(
# Assemble files
mkdir release/sitemesh-$RELEASE_VERSION
#cp pom.xml *.txt release/sitemesh-$RELEASE_VERSION
for MODULE in $MODULES_TO_PACKAGE
do
mkdir -p release/sitemesh-$RELEASE_VERSION/$MODULE
cp -R $MODULE/{src,pom.xml,*.txt} release/sitemesh-$RELEASE_VERSION/$MODULE/ 2>/dev/null
cp $MODULE/target/$MODULE-$POM_VERSION.jar release/sitemesh-$RELEASE_VERSION/$MODULE-$RELEASE_VERSION.jar 2>/dev/null
cp $MODULE/target/$MODULE-$POM_VERSION-sources.jar release/sitemesh-$RELEASE_VERSION/$MODULE-$RELEASE_VERSION-sources.jar 2>/dev/null
cp $MODULE/target/$MODULE.war release/sitemesh-$RELEASE_VERSION/$MODULE.war 2>/dev/null
done

# Create archives
cd release
echo "Creating release/sitemesh-$RELEASE_VERSION.tgz"
tar czf sitemesh-$RELEASE_VERSION.tgz sitemesh-$RELEASE_VERSION
echo "Creating release/sitemesh-$RELEASE_VERSION.zip"
zip -q sitemesh-$RELEASE_VERSION.zip sitemesh-$RELEASE_VERSION
rm -rf sitemesh-$RELEASE_VERSION
cd ..

# Other useful distribution files
cp sitemesh/target/sitemesh-$POM_VERSION.jar release/sitemesh-$RELEASE_VERSION.jar
cp sitemesh/target/sitemesh-$POM_VERSION-sources.jar release/sitemesh-$RELEASE_VERSION-sources.jar

)


0 comments on commit 615ba89

Please sign in to comment.