|
@@ -5,23 +5,33 @@
|
|
# Release Process.
|
|
# Release Process.
|
|
#
|
|
#
|
|
# 1. Do clean check out of source from svn.
|
|
# 1. Do clean check out of source from svn.
|
|
-# 2. Set the version number in the pom.xml files of all the module
|
|
|
|
-# 3. Set the correct spring version number in the pom.xml.
|
|
|
|
-# 3a Set the same version number in this script
|
|
|
|
-# 4. Commit the source with the changed version numbers and note the revision number.
|
|
|
|
-# 5. Run this script to generate the artifacts and web site in the 'release' directory.
|
|
|
|
|
|
+# 2. Switch to 1.4 JVM and run 'mvn test' from core directory.
|
|
|
|
+# 3. Set the version number in the pom.xml files of all the module
|
|
|
|
+# 4. Set the correct spring version number in the pom.xml.
|
|
|
|
+# 4a Set the same version number in this script
|
|
|
|
+# 5. Commit the source with the changed version numbers and note the revision number.
|
|
|
|
+# 6. Run this script to generate the artifacts and web site in the 'release' directory.
|
|
|
|
+# 7. Copy the zip archives and unpack them to check the contents.
|
|
|
|
+# 8. Check the site looks Ok.
|
|
|
|
+# 9. Check the reference guide links in the site are valid and that images are shown and paths in HTML are relative.
|
|
|
|
+# 10. Deploy the contacts and tutorial sample apps in a web container and check they work.
|
|
|
|
+# 11. Upload the site to acegisecurity.org (or wherever).
|
|
|
|
+# 12. Sign the zip archives using PGP.
|
|
|
|
+# 13.
|
|
#
|
|
#
|
|
#
|
|
#
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+########################################################################################################################
|
|
#
|
|
#
|
|
# Edit this release number before running. It is used to check jar names etc.
|
|
# Edit this release number before running. It is used to check jar names etc.
|
|
#
|
|
#
|
|
|
|
+########################################################################################################################
|
|
|
|
+
|
|
RELEASE_VERSION=1.0.5-SNAPSHOT
|
|
RELEASE_VERSION=1.0.5-SNAPSHOT
|
|
|
|
|
|
PROJ_DIR=`pwd`;
|
|
PROJ_DIR=`pwd`;
|
|
-RELEASE_DIR=$PROJ_DIR/release
|
|
|
|
|
|
+RELEASE_DIR=$PROJ_DIR/release-$RELEASE_VERSION
|
|
SITE_DIR=$RELEASE_DIR/site
|
|
SITE_DIR=$RELEASE_DIR/site
|
|
|
|
|
|
echo "** Project directory is $PROJ_DIR"
|
|
echo "** Project directory is $PROJ_DIR"
|
|
@@ -30,26 +40,11 @@ SVN_REV=`svn info $PROJ_DIR | grep Revision | sed "s/Revision: //"`
|
|
|
|
|
|
echo "** Building from revision $SVN_REV"
|
|
echo "** Building from revision $SVN_REV"
|
|
|
|
|
|
-#
|
|
|
|
-# Check the sandbox builds with the current configuration
|
|
|
|
-#
|
|
|
|
-
|
|
|
|
-pushd sandbox
|
|
|
|
-
|
|
|
|
-mvn clean test
|
|
|
|
-
|
|
|
|
-if [ "$?" -ne 0 ]
|
|
|
|
-then
|
|
|
|
- echo "Failed to build sandbox with current configuration."
|
|
|
|
- exit 1;
|
|
|
|
-fi
|
|
|
|
-
|
|
|
|
-popd
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+########################################################################################################################
|
|
#
|
|
#
|
|
# Create the release directory if it doesn't already exist
|
|
# Create the release directory if it doesn't already exist
|
|
#
|
|
#
|
|
|
|
+########################################################################################################################
|
|
|
|
|
|
if [[ -e $RELEASE_DIR ]]
|
|
if [[ -e $RELEASE_DIR ]]
|
|
then
|
|
then
|
|
@@ -59,7 +54,11 @@ fi
|
|
mkdir $RELEASE_DIR
|
|
mkdir $RELEASE_DIR
|
|
mkdir $SITE_DIR
|
|
mkdir $SITE_DIR
|
|
|
|
|
|
|
|
+########################################################################################################################
|
|
|
|
+#
|
|
# run maven to generate jars
|
|
# run maven to generate jars
|
|
|
|
+#
|
|
|
|
+########################################################################################################################
|
|
|
|
|
|
mvn clean install -DcreateChecksum=true
|
|
mvn clean install -DcreateChecksum=true
|
|
|
|
|
|
@@ -69,9 +68,33 @@ then
|
|
exit 1;
|
|
exit 1;
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
+########################################################################################################################
|
|
|
|
+#
|
|
|
|
+# Check the sandbox builds with the current configuration
|
|
|
|
+#
|
|
|
|
+########################################################################################################################
|
|
|
|
+
|
|
|
|
+pushd sandbox
|
|
|
|
+
|
|
|
|
+mvn clean test
|
|
|
|
+
|
|
|
|
+if [ "$?" -ne 0 ]
|
|
|
|
+then
|
|
|
|
+ echo "Failed to build sandbox with current configuration."
|
|
|
|
+ exit 1;
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+popd
|
|
|
|
+
|
|
|
|
+########################################################################################################################
|
|
|
|
+#
|
|
|
|
+# Generate Maven Web Site and Process Docbook Source.
|
|
|
|
+#
|
|
|
|
+########################################################################################################################
|
|
|
|
+
|
|
echo "** Generating site in $SITE_DIR".
|
|
echo "** Generating site in $SITE_DIR".
|
|
|
|
|
|
-mvn site docbkx:generate-html docbkx:generate-pdf site:deploy -DsiteDirectory=file://${SITE_DIR}
|
|
|
|
|
|
+mvn site site:deploy -DsiteDirectory=file://${SITE_DIR}
|
|
|
|
|
|
if [ "$?" -ne 0 ]
|
|
if [ "$?" -ne 0 ]
|
|
then
|
|
then
|
|
@@ -79,22 +102,28 @@ then
|
|
exit 1;
|
|
exit 1;
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
+########################################################################################################################
|
|
|
|
+#
|
|
# Patch the module site files to point to the root css files, change names of oversized menus,
|
|
# Patch the module site files to point to the root css files, change names of oversized menus,
|
|
# remove dodgy standard maven text etc.
|
|
# remove dodgy standard maven text etc.
|
|
#
|
|
#
|
|
|
|
+########################################################################################################################
|
|
|
|
|
|
pushd $RELEASE_DIR/site
|
|
pushd $RELEASE_DIR/site
|
|
|
|
|
|
find . -name "*.html" -maxdepth 2 -mindepth 2 | xargs perl -i -p -e 's#\./css/#\.\./css/#;' \
|
|
find . -name "*.html" -maxdepth 2 -mindepth 2 | xargs perl -i -p -e 's#\./css/#\.\./css/#;' \
|
|
-e 's/Maven Surefire Report/Unit Tests/;' \
|
|
-e 's/Maven Surefire Report/Unit Tests/;' \
|
|
-e 's/Cobertura Test Coverage/Test Coverage/;' \
|
|
-e 's/Cobertura Test Coverage/Test Coverage/;' \
|
|
- -e 's/A successful project.*greatly appreciated\.//;'
|
|
|
|
-
|
|
|
|
|
|
+ -e 's/A successful project.*greatly appreciated\.//;'
|
|
|
|
|
|
popd
|
|
popd
|
|
|
|
|
|
|
|
+########################################################################################################################
|
|
|
|
+#
|
|
|
|
+# Assemble the required jar files, make sure there are the expected number and produce signatures.
|
|
|
|
+#
|
|
|
|
+########################################################################################################################
|
|
|
|
|
|
-# Assemble the required jar files
|
|
|
|
|
|
|
|
find . -name "*${RELEASE_VERSION}.jar" | grep -v WEB-INF | xargs -I % -n 1 cp % $RELEASE_DIR
|
|
find . -name "*${RELEASE_VERSION}.jar" | grep -v WEB-INF | xargs -I % -n 1 cp % $RELEASE_DIR
|
|
find . -name "*${RELEASE_VERSION}.war" | xargs -I % -n 1 cp % $RELEASE_DIR
|
|
find . -name "*${RELEASE_VERSION}.war" | xargs -I % -n 1 cp % $RELEASE_DIR
|
|
@@ -120,4 +149,8 @@ done
|
|
|
|
|
|
popd
|
|
popd
|
|
|
|
|
|
-
|
|
|
|
|
|
+########################################################################################################################
|
|
|
|
+#
|
|
|
|
+# Build the release zip archives.
|
|
|
|
+#
|
|
|
|
+########################################################################################################################
|