This repository was archived by the owner on Jun 7, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 224
/
Copy pathmakeRelease.sh
executable file
·63 lines (53 loc) · 1.51 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/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
if [ -z "$(git status --porcelain)" ]; then
echo "Working directory clean"
else
read -p "You have uncommitted changes do you really want to release? " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
fi
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
gh release create v$1 --generate-notes
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/*
echo "Installing release on CDN"
scp dist-$1.tgz balance.runestoneacademy.org:~/
ssh balance.runestoneacademy.org /home/bmiller/bin/install_release.sh $1
mv dist-$1.tgz ../jsdist
cp dist/webpack_static_imports.xml ~/Pretext/pretext/xsl/support/runestone-services.xml
cp dist/webpack_static_imports.xml ~/.ptx/xsl/support/runestone-services.xml
else
echo "Warning: no json2xml ve found skipping pretext"
fi