From c4f1707c25eb0cd5bf0c1b94f4a9b9dc3b9824e6 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 30 Sep 2019 22:48:20 +0200 Subject: [PATCH] fix: restore Android support (#770) This change: - removes 'incognito' key from Firefox manifest - unifies manifest for Firefox on Desktop and Android (bundle:fennec calls bundle:firefox) making it possible to publish a single package supporting both platforms to work around AMO issues described in: https://github.com/ipfs-shipyard/ipfs-companion/issues/761#issuecomment-533569828 - adds `manifest.chromium.json` for Chrome-specific keys --- add-on/manifest.chromium.json | 3 +++ add-on/manifest.common.json | 3 +-- add-on/manifest.fennec.json | 3 --- package.json | 12 ++++++------ 4 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 add-on/manifest.chromium.json delete mode 100644 add-on/manifest.fennec.json diff --git a/add-on/manifest.chromium.json b/add-on/manifest.chromium.json new file mode 100644 index 000000000..5a0c19643 --- /dev/null +++ b/add-on/manifest.chromium.json @@ -0,0 +1,3 @@ +{ + "incognito": "not_allowed" +} diff --git a/add-on/manifest.common.json b/add-on/manifest.common.json index 50a96db04..bb5d04d45 100644 --- a/add-on/manifest.common.json +++ b/add-on/manifest.common.json @@ -58,6 +58,5 @@ } ], "content_security_policy": "script-src 'self'; object-src 'self'; frame-src 'self';", - "default_locale": "en", - "incognito": "not_allowed" + "default_locale": "en" } diff --git a/add-on/manifest.fennec.json b/add-on/manifest.fennec.json deleted file mode 100644 index 3f1ec8dd7..000000000 --- a/add-on/manifest.fennec.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "incognito": null -} diff --git a/package.json b/package.json index 660d039bf..2b2a0ef6b 100644 --- a/package.json +++ b/package.json @@ -26,18 +26,18 @@ "build:js": "run-s build:js:*", "build:js:webpack": "webpack -p", "build:minimize-dist": "shx rm -rf add-on/dist/lib add-on/dist/contentScripts/ add-on/dist/bundles/ipfsProxyContentScriptPayload.bundle.js", - "build:bundle-all": "cross-env RELEASE_CHANNEL=${RELEASE_CHANNEL:=dev} run-s bundle:chromium bundle:brave:$RELEASE_CHANNEL bundle:fennec:$RELEASE_CHANNEL bundle:firefox:$RELEASE_CHANNEL", + "build:bundle-all": "cross-env RELEASE_CHANNEL=${RELEASE_CHANNEL:=dev} run-s bundle:chromium bundle:brave:$RELEASE_CHANNEL bundle:firefox:$RELEASE_CHANNEL", "build:rename-artifacts": "./scripts/rename-artifacts.js", "bundle": "run-s bundle:*", - "bundle:chromium": "shx cp add-on/manifest.common.json add-on/manifest.json && web-ext build -a build/chromium && run-s build:rename-artifacts", + "bundle:chromium": "shx cat add-on/manifest.common.json add-on/manifest.chromium.json | json --deep-merge > add-on/manifest.json && web-ext build -a build/chromium && run-s build:rename-artifacts", "bundle:firefox": "shx cat add-on/manifest.common.json add-on/manifest.firefox.json | json --deep-merge > add-on/manifest.json && web-ext build -a build/firefox/ && run-s build:rename-artifacts", "bundle:firefox:dev": "npm run bundle:firefox", "bundle:firefox:stable": "npm run bundle:firefox", "bundle:firefox:beta": "shx cat add-on/manifest.common.json add-on/manifest.firefox.json add-on/manifest.firefox-beta.json | json --deep-merge > add-on/manifest.json && web-ext build -a build/firefox/ && run-s build:rename-artifacts", - "bundle:fennec": "shx cat add-on/manifest.common.json add-on/manifest.firefox.json add-on/manifest.fennec.json | json --deep-merge > add-on/manifest.json && web-ext build -a build/fennec/ && run-s build:rename-artifacts", - "bundle:fennec:dev": "npm run bundle:fennec", - "bundle:fennec:stable": "npm run bundle:fennec", - "bundle:fennec:beta": "shx cat add-on/manifest.common.json add-on/manifest.firefox.json add-on/manifest.firefox-beta.json add-on/manifest.fennec.json | json --deep-merge > add-on/manifest.json && web-ext build -a build/fennec/ && run-s build:rename-artifacts", + "bundle:fennec": "npm run bundle:firefox", + "bundle:fennec:dev": "npm run bundle:firefox:dev", + "bundle:fennec:stable": "npm run bundle:firefox:stable", + "bundle:fennec:beta": "npm run bundle:firefox:beta", "bundle:brave": "shx cat add-on/manifest.common.json add-on/manifest.brave.json | json --deep-merge > add-on/manifest.json && web-ext build -a build/brave/ && run-s build:rename-artifacts", "bundle:brave:dev": "npm run bundle:brave", "bundle:brave:stable": "npm run bundle:brave",