-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmkrelease
executable file
·43 lines (43 loc) · 1.1 KB
/
mkrelease
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
#!/bin/bash -x
#./runtests
#if [ $? -ne 0 ]
#then
# echo "Tests failed! Stopping release!"
# exit $?
#fi
version=$1
echo $version >VERSION
echo "__version__ = '$version'" >slides_sound/version.py
file_version=${version//[\.]/_}
if [ -f slides_sound_$file_version.zip ];
then rm slides_sound_$file_version.zip;
fi
./mkdocs
zip_python () {
if [ -d $1 ];
then return;
elif [[ $1 == *.py ]];
then zip -q slides_sound_$2.zip $1;
elif [ `grep -c "\#\!.*python" $1` -eq 1 ];
then zip -q slides_sound_$2.zip $1;
fi
}
for f in {slides_sound,scripts}/*;
do zip_python $f $file_version;
done
zip -q slides_sound_$file_version.zip docs/*
for f in docs/{slides_sound,scripts}/*;
do zip -q slides_sound_$file_version.zip $f;
done
zip -q slides_sound_$file_version.zip requirements.txt
zip -q slides_sound_$file_version.zip LICENSE
zip -q slides_sound_$file_version.zip README.md
unzip -l slides_sound_$file_version.zip
if [ -d dist ];
then rm -rf dist
fi
if [ -d build ];
then rm -rf build
fi
python3 -m pip install --upgrade setuptools wheel
python3 setup.py sdist bdist_wheel