3 if [ "x$1" = "xhelp" ]; then
4 echo "Usage: ./httpd_roll_release tag log_name [user]"
5 echo "tag the tag to use when checking out the repository"
6 echo "log_name the name of a file to log the results to."
7 echo "user An optional user name to use when siging the release"
18 WORKING_DIR=`echo "$REPO" | sed -e 's/[\-\.]/_/g'`
19 WORKING_TAG=`echo "$TAG" | sed -e 's/APACHE_2_0_/_/'`
20 WORKING_DIR="$WORKING_DIR$WORKING_TAG"
22 START_DIR=`echo "$PWD"`
24 # Check out the correct repositories.
25 echo "Checking out repository $REPO into $WORKING_DIR using tag $TAG"
28 echo Checking out httpd-2.0 > $LOG_NAME
29 cvs checkout -r $TAG -d $WORKING_DIR $REPO >> $LOG_NAME
30 cd $WORKING_DIR/srclib
31 echo "Checking out apr and apr-util" >> $LOG_NAME
32 cvs checkout -r $TAG apr apr-util >> $LOG_NAME
33 cd $START_DIR/$WORKING_DIR
35 # Make sure the master site's FAQ is up-to-date. It doesn't hurt to do this
37 echo "Updating the site's FAQ"
38 (cd /www/www.apache.org/docs-2.0/misc ; cvs update)
40 # Now update the FAQ in the tarball
41 rm -f docs/manual/misc/FAQ*.html
42 links -source http://www.apache.org/docs-2.0/misc/FAQ.html > docs/manual/misc/FAQ.html
44 # Create the configure scripts
45 echo "Creating the configure script"
46 cd $START_DIR/$WORKING_DIR
49 echo "Running ./buildconf" >> $LOG_NAME
50 ./buildconf >> $LOG_NAME
52 # Remove any files we don't distribute with our code
56 echo "Removing files that we don't distribute" >> $LOG_NAME
57 find . -name ".cvsignore" -exec rm {} \; >> $LOG_NAME
58 find . -type d -name "test" | xargs rm -rf >> $LOG_NAME
59 find . -type d -name "CVS" | xargs rm -rf >> $LOG_NAME
61 # expand SSI directives in the manual
62 echo "Making sure people can read the manual (expanding SSI's)"
65 echo "Making sure people can read the manual (expanding SSI's)" >> $LOG_NAME
66 ( cd docs/manual ; chmod +x expand.pl ; ./expand.pl ; rm ./expand.pl ) >> $LOG_NAME
68 # Time to roll the tarball
69 echo "Rolling the tarballs"
73 echo "Rolling the tarball" >> $LOG_NAME
74 tar cvf $WORKING_DIR-alpha.tar $WORKING_DIR >> $LOG_NAME
75 cp -p $WORKING_DIR-alpha.tar x$WORKING_DIR-alpha.tar
76 gzip -9 $WORKING_DIR-alpha.tar
77 mv x$WORKING_DIR-alpha.tar $WORKING_DIR-alpha.tar
78 compress $WORKING_DIR-alpha.tar
81 echo "Testing the tarball"
84 echo "Testing the tarball $WORKING_DIR-alpha.tar.gz" >> $LOG_NAME
85 gunzip -c $WORKING_DIR-alpha.tar.gz | tar tvf - >> $LOG_NAME
86 zcat $WORKING_DIR-alpha.tar.Z | tar tvf - >> $LOG_NAME
88 # remember the CHANGES file
89 echo "Copying the CHANGES file to this directory"
90 cp $WORKING_DIR/CHANGES .
93 echo "Cleaning up my workspace"
96 if [ "x$USER" != "x" ]; then
100 echo Tagging the tarballs
102 echo "Taggig the tarballs" >> $LOG_NAME
103 pgp -sba $WORKING_DIR-alpha.tar.gz $USER
104 pgp -sba $WORKING_DIR-alpha.tar.Z $USER
106 pgp $WORKING_DIR-alpha.tar.gz.asc $WORKING_DIR-alpha.tar.gz >> $LOG_NAME
107 pgp $WORKING_DIR-alpha.tar.Z.asc $WORKING_DIR-alpha.tar.Z >> $LOG_NAME
109 echo "Don't forget to make the tarballs available by copying them to the"
110 echo "/www/dev.apache.org/dist directory."