mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
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.
This commit is contained in:
parent
82f93c693d
commit
34b48e844e
2 changed files with 26 additions and 7 deletions
|
@ -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'
|
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=''
|
EXPLANATION=''
|
||||||
|
|
||||||
if [ "$1" = '-m' ] ; then
|
if [ "$1" = '-m' ] ; then
|
||||||
|
@ -30,12 +40,12 @@ make --no-print-directory bziphtml || exit $?
|
||||||
RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'`
|
RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'`
|
||||||
PACKAGE="html-$RELEASE.tar.bz2"
|
PACKAGE="html-$RELEASE.tar.bz2"
|
||||||
scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $?
|
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:
|
The development version of the documentation has been updated:
|
||||||
|
|
||||||
http://python.sourceforge.net/devel-docs/
|
http://python.sourceforge.net/$DOCTYPE-docs/
|
||||||
|
|
||||||
$EXPLANATION
|
$EXPLANATION
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -11,11 +11,20 @@ if [ -z "$HOME" ] ; then
|
||||||
export HOME
|
export HOME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
UPDATES="$HOME/tmp/$1"
|
DOCTYPE="$1"
|
||||||
|
UPDATES="$HOME/tmp/$2"
|
||||||
|
|
||||||
|
TMPDIR="$$-docs"
|
||||||
|
|
||||||
cd /home/groups/python/htdocs || exit $?
|
cd /home/groups/python/htdocs || exit $?
|
||||||
rm -rf devel-docs || exit $?
|
mkdir $TMPDIR || exit $?
|
||||||
mkdir devel-docs || exit $?
|
cd $TMPDIR || exit $?
|
||||||
cd devel-docs || exit $?
|
|
||||||
(bzip2 -dc "$UPDATES" | tar xf -) || exit $?
|
(bzip2 -dc "$UPDATES" | tar xf -) || exit $?
|
||||||
|
cd .. || exit $?
|
||||||
|
|
||||||
|
if [ -d $DOCTYPE-docs ] ; then
|
||||||
|
mv $DOCTYPE-docs $DOCTYPE-temp
|
||||||
|
fi
|
||||||
|
mv $TMPDIR $DOCTYPE-docs
|
||||||
|
rm -rf $DOCTYPE-temp || exit $?
|
||||||
rm "$UPDATES" || exit $?
|
rm "$UPDATES" || exit $?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue