forked from RunestoneInteractive/RunestoneComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakeRelease.sh
executable file
·48 lines (38 loc) · 941 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
#!/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 pyproject.toml " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
echo "Building webpack bundle"
npm run dist
echo "building python package"
poetry build
poetry publish
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:~/
mv dist-$1.tgz ../jsdist
else
echo "Warning: no json2xml ve found skipping pretext"
fi