summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhackademix2020-01-09 21:41:03 +0100
committerhackademix2020-01-09 21:41:03 +0100
commit9569a4010726c1691cc9470533528b9b27138d42 (patch)
tree703df6860d595573e141e3a4935762e13c324d84
parente886d7bea043413bb392353777a4d73842e05c46 (diff)
downloadnoscript-9569a4010726c1691cc9470533528b9b27138d42.tar.gz
noscript-9569a4010726c1691cc9470533528b9b27138d42.tar.xz
noscript-9569a4010726c1691cc9470533528b9b27138d42.zip
Remove "application" manifest.json key from Chromium packages.
-rw-r--r--build.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index 841a136..13936de 100644
--- a/build.sh
+++ b/build.sh
@@ -75,7 +75,8 @@ cp -pR "$SRC" "$BUILD"
cp -p LICENSE.txt GPL.txt "$BUILD"/
BUILD_CMD="web-ext"
-BUILD_OPTS="build"
+BUILD_OPTS="build --overwrite-dest"
+CHROMIUM_BUILD_OPTS="$BUILD_OPTS"
if [[ $VER == *rc* ]]; then
sed -re 's/^(\s+)"strict_min_version":.*$/\1"update_url": "https:\/\/secure.informaction.com\/update\/?v='$VER'",\n\0/' \
@@ -114,7 +115,7 @@ else
WEBEXT_OUT="$XPI_DIR"
fi
-COMMON_BUILD_OPTS="--ignore-files=test/XSS_test.js --overwrite-dest"
+COMMON_BUILD_OPTS="--ignore-files=test/XSS_test.js"
"$BUILD_CMD" $BUILD_OPTS --source-dir="$WEBEXT_IN" --artifacts-dir="$WEBEXT_OUT" $COMMON_BUILD_OPTS
SIGNED="$XPI_DIR/noscript_security_suite-$VER-an+fx.xpi"
@@ -133,5 +134,9 @@ ln -fs $XPI.xpi "$BASE/latest.xpi"
# create chromium pre-release
rm -rf "$CHROMIUM"
strip_rc_ver "$MANIFEST_OUT"
+# skip "application" manifest key
+(grep -B1000 '"name": "NoScript"' "$MANIFEST_OUT"; \
+ grep -A2000 '"version":' "$MANIFEST_OUT") > "$MANIFEST_OUT".tmp && \
+ mv "$MANIFEST_OUT.tmp" "$MANIFEST_OUT"
mv "$BUILD" "$CHROMIUM"
-web-ext build --source-dir="$CHROMIUM" --artifacts-dir="$WEBEXT_OUT" --ignore-files=test/XSS_test.js $COMMON_BUILD_OPTS
+web-ext $CHROMIUM_BUILD_OPTS --source-dir="$CHROMIUM" --artifacts-dir="$WEBEXT_OUT" $COMMON_BUILD_OPTS