forked from RunestoneInteractive/RunestoneComponents
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makeRelease.sh
executable file
·49 lines (38 loc) · 981 Bytes
/
makeRelease.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
#!/bin/bash
# *********
# |docname|
# *********
set -e
if [ $# -eq 0 ]
then
echo "Usage: makeRelease <release no>"
exit
fi
while true; do
read -p "Did you update/commit the version in setup.py " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
rm -f dist/*
npm run dist
python setup.py sdist
pip wheel --no-index --no-deps --global-option bdist_wheel --wheel-dir dist dist/*.tar.gz
twine check dist/*
twine upload dist/*
echo "tagging this release and pushing to github"
git tag -a $1 -m 'tag new version'
git push --follow-tags
if [ -d ~/.virtualenvs/json2xml ]
then
echo "Creating dist for PreTeXt"
source ~/.virtualenvs/json2xml/bin/activate
python scripts/dist2xml.py $1
cd runestone
tar --strip-components 1 -zcf dist-$1.tgz dist/*
scp dist-$1.tgz balance.runestoneacademy.org:~/
else
echo "Warning: no json2xml ve found skipping pretext"
fi