forked from mathics/Mathics
-
Notifications
You must be signed in to change notification settings - Fork 1
/
release.sh
executable file
·41 lines (35 loc) · 1.04 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
# Before releasing:
# Clear directory build/
# python setup.py develop
# mathics/
# python test.py -o
# python test.py -t
# mathics/doc/tex/
# make latex
# Then run this file.
version=`python -c "import mathics; print(mathics.__version__)"`
echo "Releasing Mathics $version"
rm -rf build/release
python setup.py build
mkdir build/release
rm build/lib/mathics/doc/xml/data # data file is big so make sure we don't package it
cp -r build/lib*/mathics build/release/
rm build/release/*/*/*.so
cp setup.py AUTHORS.txt CHANGES.rst COPYING.txt README.rst build/release/
cp mathics/doc/tex/mathics.pdf build/release/
zipfilename="mathics-$version.zip"
tgzfilename="mathics-$version.tgz"
releasedir="mathics-$version"
rm -f "build/$zipfilename"
rm -f "build/$tgzfilename"
cd build/
cp -r release/ $releasedir/
echo "Creating ZIP file $zipfilename"
zip -r $zipfilename $releasedir/
echo "Creating TGZ file $tgzfilename"
tar czf $tgzfilename $releasedir/
cd ..
mkdir -p Homepage/release
cp "build/$zipfilename" Homepage/release/
echo "Done"