Skip to content

Commit e73ee4b

Browse files
committed
During build, roll all .xml files into one
(that one file is currently called default.rulesets)
1 parent 568d716 commit e73ee4b

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

.build_exclusions

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pkg/*.xpi
2+
*~
3+
*.sw?
4+
chrome/content/rules/*.xml
5+
chrome/content/rules/*.py
6+
chrome/content/rules/make-*
7+
*.xcf.gz

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.gitignore
2+
.gitattributes
3+
.build_exclusions
4+
chrome/content/rules/*.xml export-ignore
5+
chrome/content/rules/*.py export-ignore
6+
chrome/content/rules/make-* export-ignore
7+
*.xcf.gz export-ignore

makexpi.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,22 @@ XPI_NAME="pkg/$APP_NAME-$VERSION.xpi"
5454
[ -d pkg ] || mkdir pkg
5555

5656
cd "src"
57+
set -x
58+
echo "<rulelibrary>" > chrome/content/rules/default.rulesets
59+
cat chrome/content/rules/*.xml >> chrome/content/rules/default.rulesets
60+
echo "</rulelibrary>" >> chrome/content/rules/default.rulesets
61+
rm -f "../$XPI_NAME"
5762
if [ "$1" = "uncommitted" ]; then
5863
printf >&2 "WARNING: using zip instead of git archive to build .xpi\n"
5964
CHANGES="$(git status . -s)"
6065
if [ -n "$CHANGES" ]; then
6166
printf >&2 "WARNING: uncommitted changes were included:\n%s\n" "$CHANGES"
6267
fi
63-
# FIXME: is it really acceptable to reuse .gitignore to specify
64-
# include patterns for /usr/bin/zip? It seems to work for our
65-
# current patterns (2010-11-09)
66-
zip -X -q -9r "../$XPI_NAME" . "-x@../.gitignore"
68+
zip -v -X -9r "../$XPI_NAME" . "-x@../.build_exclusions"
6769
else
6870
git archive --format=zip -9 "$TARG" . > "../$XPI_NAME"
6971
fi
72+
set +x
7073

7174
ret="$?"
7275
if [ "$ret" != 0 ]; then

0 commit comments

Comments
 (0)