Skip to content

Commit ba9db3f

Browse files
committed
Add make-sqlite to make{xpi,crx} before validation.
1 parent b9b193d commit ba9db3f

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

makecrx.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ VERSION=`python -c "import json ; print(json.loads(open('chromium/manifest.json'
3636

3737
echo "Building chrome version" $VERSION
3838

39+
# Build the SQLite DB even though we don't yet use it in the Chrome extension,
40+
# because trivial-validate.py depends on it.
41+
if [ "$1" != "--fast" -o ! -f "$RULESETS_SQLITE" ] ; then
42+
echo "Generating sqlite DB"
43+
python2.7 ./utils/make-sqlite.py src/chrome/content/rules
44+
fi
45+
3946
if [ -f utils/trivial-validate.py ]; then
4047
VALIDATE="./utils/trivial-validate.py --ignoredups google --ignoredups facebook"
4148
elif [ -x utils/trivial-validate ] ; then

makexpi.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ fi
5858
nohup cat src/chrome/content/rules/*.xml >/dev/null 2>/dev/null &
5959

6060

61+
if [ "$1" != "--fast" -o ! -f "$RULESETS_SQLITE" ] ; then
62+
echo "Generating sqlite DB"
63+
python2.7 ./utils/make-sqlite.py src/chrome/content/rules
64+
fi
65+
6166
# =============== BEGIN VALIDATION ================
6267
# Unless we're in a hurry, validate the ruleset library & locales
6368

@@ -108,11 +113,6 @@ if [ "$1" != "--fast" ] ; then
108113
fi
109114
# =============== END VALIDATION ================
110115

111-
if [ "$1" != "--fast" -o ! -f "$RULESETS_SQLITE" ] ; then
112-
echo "Generating sqlite DB"
113-
python2.7 ./utils/make-sqlite.py src/chrome/content/rules
114-
fi
115-
116116
# The name/version of the XPI we're building comes from src/install.rdf
117117
XPI_NAME="pkg/$APP_NAME-`grep em:version src/install.rdf | sed -e 's/[<>]/ /g' | cut -f3`"
118118
if [ "$1" ] && [ "$1" != "--fast" ] ; then

utils/trivial-validate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ def nomes_all(where=sys.argv[1:]):
194194
xpath_from = etree.XPath("/ruleset/rule/@from")
195195
xpath_to = etree.XPath("/ruleset/rule/@to")
196196

197-
print args.db
198197
conn = sqlite3.connect(args.db)
199198
c = conn.cursor()
200199
for row in c.execute('''SELECT contents from rulesets'''):

0 commit comments

Comments
 (0)