forked from JustasB/BlenderNEURON
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·42 lines (30 loc) · 1011 Bytes
/
build.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
set -e
function install
{
version=$(cat releases/latest.txt)
echo Current version is: $version
echo Type in the new version
read version
file=releases/BlenderNEURON-v$version.zip
file_latest=releases/BlenderNEURON-latest.zip
# Update version file
echo $version > releases/latest.txt
# Create addon zip
zip -q -r $file blenderneuron -i '*.py' '*.json' '*.hoc'
cp $file $file_latest
# Create wheels and upload to pip
rm -R dist/* || true
/home/justas/anaconda2/envs/pb35/bin/python setup.py sdist bdist_wheel
/home/justas/anaconda2/envs/p27/bin/python setup.py sdist bdist_wheel
echo 'Built Addon .zip file:' $file
echo Getting ready to upload to pypi
/home/justas/anaconda2/envs/p27/bin/python -m twine upload dist/*
}
while true; do
read -p "This will build and upload to pip. Continue?" yn
case $yn in
[Yy]* ) install; break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done