-
Notifications
You must be signed in to change notification settings - Fork 86
/
create_version.sh
executable file
·63 lines (41 loc) · 1013 Bytes
/
create_version.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
t=`which twine`
if [ $? -ne 0 ]; then
echo "twine is required, please install it"
exit 1
fi
echo "STEP to be done before:
* update CHANGES and pymodis/__init__.py files
* add new tag
* run this script
";
echo "Could it \"procede\" (answer yes or no)?"
read procede
if [ $procede = "yes" ]; then
pymodis_version=`python setup.py -V`
curdir=`pwd`
rm -rf build/*
rm -rf dist/*
python3 -m build
cd docs/
make latexpdf
make html
cd build/html/
find . -type f -name "*~" -exec rm -f {} \;
cp ../latex/pyModis.pdf .
zip -r -9 $curdir/pymodis_${pymodis_version}_html.zip *
cd $curdir
rm -rf docs/build/
find . -type f -name "*~" -exec rm -f {} \;
twine check dist/*
echo "Is twine \"check\" ok? (answer yes or no)"
read check
if [ $check = "yes" ]; then
twine upload dist/*
fi
echo "Do you want create \"Debian\" packages (answer yes or no)?"
read Debian
if [ $Debian = "yes" ]; then
su -c "dpkg-buildpackage -us -uc -d"
fi
fi