source: trunk/mktar @ 755

Last change on this file since 755 was 755, checked in by cito, 4 years ago

Some more improvements in mkdocs and mktar

  • 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 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
30echo "Making source tarball..."
31
32# Make sure that the documentation has been built.
33
34./mkdocs
35
36# The following does essentially the same as "python setup.py sdist".
37
38TD=PyGreSQL-$VERSION
39TF=$DISTDIR/$TD.tgz
40
41MODFILES="pg.py pgdb.py pgmodule.c
42          pgtypes.h py3c.h
43          setup.py setup.cfg
44          LICENSE.txt README.rst MANIFEST.inq "
45DOCFILES="docs/Makefile docs/make.bat docs/*.rst docs/*.py
46          docs/contents docs/download docs/community
47          docs/_static docs/_templates"
48HTMLFILES="docs/_build/html"
49TESTFILES="tests/*.py"
50
51rm -rf $TD
52mkdir $TD
53mkdir -p $TD/docs/_build/html
54mkdir $TD/tests
55cp $MODFILES $TD
56cp -r $DOCFILES $TD/docs
57cp -r $HTMLFILES $TD/docs/_build
58cp $TESTFILES $TD/tests
59tar -cvzf $TF $TD
60chmod 644 $TF
61rm -rf $TD
62rm -f $DISTDIR/$SYMLINK
63ln -s $TD.tgz $DISTDIR/$SYMLINK
64
65echo "$TF has been built"
Note: See TracBrowser for help on using the repository browser.