From 9569a4010726c1691cc9470533528b9b27138d42 Mon Sep 17 00:00:00 2001 From: hackademix Date: Thu, 9 Jan 2020 21:41:03 +0100 Subject: Remove "application" manifest.json key from Chromium packages. --- build.sh | 11 ++++++++--- 1 file 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 -- cgit v1.2.3