2006-11-16 22:36:52 +08:00
|
|
|
#!/bin/bash -xe
|
2006-11-08 23:11:58 +08:00
|
|
|
#
|
2006-11-16 22:36:52 +08:00
|
|
|
# publish Hudson javadoc and deploy that into the java.net CVS repository
|
2006-11-08 23:11:58 +08:00
|
|
|
#
|
|
|
|
|
|
2008-08-22 09:00:11 +08:00
|
|
|
# make sure we have up-to-date copy so that the commit won't fail later
|
2006-11-18 02:02:13 +08:00
|
|
|
pushd ../../../www/javadoc
|
2008-04-15 09:31:54 +08:00
|
|
|
svn revert -R .
|
2008-04-08 12:20:24 +08:00
|
|
|
svn update
|
2006-11-18 02:02:13 +08:00
|
|
|
popd
|
|
|
|
|
|
2007-09-15 08:53:23 +08:00
|
|
|
cp -R target/checkout/core/target/apidocs/* ../../../www/javadoc
|
2008-08-22 09:00:11 +08:00
|
|
|
cp -R target/checkout/test/target/apidocs/* ../../../www/javadoc/test
|
2006-11-08 23:11:58 +08:00
|
|
|
|
2006-11-18 02:02:13 +08:00
|
|
|
cd ../../../www/javadoc
|
2006-11-08 23:11:58 +08:00
|
|
|
|
2008-03-23 22:44:38 +08:00
|
|
|
# remove timestamp as this creates unnecessary revisions for javadoc files
|
2008-04-04 00:50:04 +08:00
|
|
|
find . -name "*.html" | xargs perl -p -i.bak -e "s|-- Generated by javadoc .+--|-- --|"
|
|
|
|
|
find . -name "*.html" | xargs perl -p -i.bak -e "s|<META NAME=\"DATE\" CONTENT=\"....-..-..\">||"
|
2008-03-23 22:44:38 +08:00
|
|
|
find . -name "*.bak" | xargs rm
|
|
|
|
|
|
2006-11-08 23:11:58 +08:00
|
|
|
# ignore everything under CVS, then
|
|
|
|
|
# ignore all files that are already in CVS, then
|
|
|
|
|
# add the rest of the files
|
2007-08-04 07:29:14 +08:00
|
|
|
#find . -name CVS -prune -o -exec bash in-cvs.sh {} \; -o \( -print -a -exec cvs add {} \+ \)
|
2008-04-08 12:20:24 +08:00
|
|
|
#rcvsadd . "commiting javadoc"
|
2008-04-09 22:55:28 +08:00
|
|
|
svn add $(svn status | grep "^?" | cut -d " " -f2-) .
|
2008-04-08 12:20:24 +08:00
|
|
|
svn commit -m "commiting javadoc"
|
2006-11-08 23:11:58 +08:00
|
|
|
|
|
|
|
|
# sometimes the first commit fails
|
2007-08-04 07:29:14 +08:00
|
|
|
#cvs commit -m "commit 1 " || cvs commit -m "commit 2"
|