Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit bec1a0a

Browse files
committed
Scripts for building webpack xml file
1 parent 9356222 commit bec1a0a

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ bower_componenets/
4848
runestone/*/test/build_info
4949
**/sphinx_settings.json
5050
build_info
51+
runestone/dist*.tgz
5152
dist/
5253

5354
# IDEs

makeRelease.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if [ -d ~/.virtualenvs/json2xml ]
4040

4141
echo "Creating dist for PreTeXt"
4242
source ~/.virtualenvs/json2xml/bin/activate
43-
python dist2xml.py $1 > runestone/dist/webpack_static_imports.xml
43+
python scripts/dist2xml.py $1 > runestone/dist/webpack_static_imports.xml
4444
cd runestone
4545
tar zcf dist-$1.tgz dist
4646
else

scripts/dist2xml.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import json
2+
from json2xml import json2xml
3+
from json2xml.utils import readfromstring
4+
import sys
5+
6+
data = json.loads(open("runestone/dist/webpack_static_imports.json").read())
7+
data['version'] = sys.argv[1]
8+
#data = readfromstring()
9+
print(json2xml.Json2xml(data).to_xml())

scripts/makePtx.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
if (( $# < 1 )); then
4+
echo "please provide version number"
5+
exit
6+
fi
7+
8+
source ~/.virtualenvs/compdev39/bin/activate
9+
npm run dist
10+
source ~/.virtualenvs/json2xml/bin/activate
11+
python dist2xml.py $1 > runestone/dist/webpack_static_imports.xml
12+
cd runestone
13+
tar zcf dist-$1.tgz dist
14+
deactivate

0 commit comments

Comments
 (0)