source: trunk/mktar @ 710

Last change on this file since 710 was 710, checked in by cito, 3 years ago

Port all doc changes from 4.x branch to trunk

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#! /bin/sh
2
3VERSION=5.0
4DISTDIR=/u/pyg/files
5
6# small safety tests
7if [ ! -f module/pgmodule.c ]
8then
9        echo "Hmmm.  Are you sure you are in the right directory?"
10        exit 1
11fi
12if [ ! -d $DISTDIR ]
13then
14        echo "Hmmm.  Are you sure you are on the right server?"
15        exit 1
16fi
17
18if [ -f BETA ]
19then
20        VERSION=$VERSION-pre`date +"%y%m%d"`
21        PACKAGE=pygresql.pkg-beta
22        SYMLINK=PyGreSQL-beta.tgz
23else
24        PACKAGE=pygresql.pkg
25        SYMLINK=PyGreSQL.tgz
26fi
27
28# Package up as a source tarball in the distribution directory.
29# Note that this does essentially the same as "python setup.py sdist",
30# except this also makes the docs and bundles them as source and html.
31
32TD=PyGreSQL-$VERSION
33TF=$DISTDIR/$TD.tgz
34
35MODFILES="module/pg.py module/pgdb.py module/pgmodule.c
36          module/pgfs.h module/pgtypes.h module/py3c.h
37          module/setup.py module/setup.cfg"
38DOCFILES="docs/Makefile docs/make.bat docs/*.rst
39          docs/contents docs/download docs/community
40          docs/_static docs/_templates"
41HTMLFILES="docs/_build/html"
42TESTFILES="module/tests/*.py"
43
44echo "Making source tarball..."
45
46./mkdocs
47
48rm -rf $TD
49mkdir $TD
50mkdir -p $TD/docs/_build/html
51mkdir $TD/tests
52cp $MODFILES $TD
53cp -r $DOCFILES $TD/docs
54cp -r $HTMLFILES $TD/docs/_build
55cp $TESTFILES $TD/tests
56tar -cvzf $TF $TD
57chmod 644 $TF
58rm -rf $TD
59rm -f $DISTDIR/$SYMLINK
60ln -s $TD.tgz $DISTDIR/$SYMLINK
61
62echo "$TF has been built"
Note: See TracBrowser for help on using the repository browser.