summaryrefslogtreecommitdiffstats
path: root/Doc/tools/push-docs.sh
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-04-22 06:20:31 (GMT)
committerFred Drake <fdrake@acm.org>2001-04-22 06:20:31 (GMT)
commit34b48e844e546df7c5939d2624f80624c23312ca (patch)
tree5b6e85e74e7bb2917ba35071cc208de0970eda54 /Doc/tools/push-docs.sh
parent82f93c693dda388e9026dafd8a5636843df82e55 (diff)
downloadcpython-34b48e844e546df7c5939d2624f80624c23312ca.zip
cpython-34b48e844e546df7c5939d2624f80624c23312ca.tar.gz
cpython-34b48e844e546df7c5939d2624f80624c23312ca.tar.bz2
Update publish-to-SourceForge scripts to automatically determine if the
branch is the head (development) branch or a maintenance brach, and use the appropriate target directory for each.
Diffstat (limited to 'Doc/tools/push-docs.sh')
-rwxr-xr-xDoc/tools/push-docs.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/Doc/tools/push-docs.sh b/Doc/tools/push-docs.sh
index c227bcf..27366b3 100755
--- a/Doc/tools/push-docs.sh
+++ b/Doc/tools/push-docs.sh
@@ -7,6 +7,16 @@ TARGET=python.sourceforge.net:/home/users/fdrake/tmp
ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org'
+VERSION=`echo '$Revision$' | sed 's/[$]Revision: \(.*\) [$]/\1/'`
+EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'`
+if [ "$EXTRA" ] ; then
+ DOCLABEL="maintenance"
+ DOCTYPE="maint"
+else
+ DOCLABEL="development"
+ DOCTYPE="devel"
+fi
+
EXPLANATION=''
if [ "$1" = '-m' ] ; then
@@ -30,12 +40,12 @@ make --no-print-directory bziphtml || exit $?
RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'`
PACKAGE="html-$RELEASE.tar.bz2"
scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $?
-ssh python.sourceforge.net tmp/update-docs.sh $PACKAGE '&&' rm tmp/update-docs.sh || exit $?
+ssh python.sourceforge.net tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $?
-Mail -s '[development doc updates]' $ADDRESSES <<EOF
+Mail -s "[$DOCLABEL doc updates]" $ADDRESSES <<EOF
The development version of the documentation has been updated:
- http://python.sourceforge.net/devel-docs/
+ http://python.sourceforge.net/$DOCTYPE-docs/
$EXPLANATION
EOF