diff options
author | Sebastian <sebasjm@gmail.com> | 2021-12-20 01:38:20 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-12-20 16:18:39 -0300 |
commit | a4e65c462ab71244eff01d7d172866ab71709143 (patch) | |
tree | 0a3540ff9355e5448c69fbdb0f0aeb71e0088fa5 /packages/taler-wallet-webextension | |
parent | c9bd8e672cf68271c9bd0694ee2a317d64e1e99a (diff) |
split extension v2 & v3
Diffstat (limited to 'packages/taler-wallet-webextension')
-rwxr-xr-x | packages/taler-wallet-webextension/clean_and_build.sh | 5 | ||||
-rwxr-xr-x | packages/taler-wallet-webextension/clean_and_build_fast.sh | 9 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/manifest-v2.json (renamed from packages/taler-wallet-webextension/manifest.json) | 12 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/manifest-v3.json | 51 | ||||
-rwxr-xr-x | packages/taler-wallet-webextension/pack.sh | 24 |
5 files changed, 84 insertions, 17 deletions
diff --git a/packages/taler-wallet-webextension/clean_and_build.sh b/packages/taler-wallet-webextension/clean_and_build.sh index fb8b31c7e..be20d80d9 100755 --- a/packages/taler-wallet-webextension/clean_and_build.sh +++ b/packages/taler-wallet-webextension/clean_and_build.sh @@ -2,5 +2,8 @@ # This file is in the public domain. [ "also-wallet" == "$1" ] && { pnpm -C ../taler-wallet-core/ compile || exit 1; } [ "also-util" == "$1" ] && { pnpm -C ../taler-util/ prepare || exit 1; } -pnpm clean && pnpm compile && rm -rf extension/ && ./pack.sh && (cd extension/ && unzip taler*.zip) +pnpm clean && pnpm compile && rm -rf extension/ && ./pack.sh +(cd extension/v2 && unzip taler*.zip) +(cd extension/v3 && unzip taler*.zip) + diff --git a/packages/taler-wallet-webextension/clean_and_build_fast.sh b/packages/taler-wallet-webextension/clean_and_build_fast.sh index 707070437..bac758c92 100755 --- a/packages/taler-wallet-webextension/clean_and_build_fast.sh +++ b/packages/taler-wallet-webextension/clean_and_build_fast.sh @@ -1,4 +1,11 @@ #!/usr/bin/env bash # This file is in the public domain. -rm -rf dist lib tsconfig.tsbuildinfo && (cd ../.. && rm -rf build/web && ./contrib/build-fast-web.sh) && rm -rf extension/ && ./pack.sh && (cd extension/ && unzip taler*.zip) +set -e + +rm -rf dist lib tsconfig.tsbuildinfo +(cd ../.. && rm -rf build/web && ./contrib/build-fast-web.sh) +rm -rf extension/ +./pack.sh +(cd extension/v2 && unzip taler*.zip) +(cd extension/v3 && unzip taler*.zip) diff --git a/packages/taler-wallet-webextension/manifest.json b/packages/taler-wallet-webextension/manifest-v2.json index 5746ef93c..91dd04cee 100644 --- a/packages/taler-wallet-webextension/manifest.json +++ b/packages/taler-wallet-webextension/manifest-v2.json @@ -1,39 +1,32 @@ { "manifest_version": 2, - "name": "GNU Taler Wallet (git)", "description": "Privacy preserving and transparent payments", "author": "GNU Taler Developers", "version": "0.8.1.15", "version_name": "0.8.1-dev.15", - "minimum_chrome_version": "51", "minimum_opera_version": "36", - "applications": { "gecko": { "id": "wallet@taler.net", "strict_min_version": "57.0" } }, - "icons": { "32": "static/img/icon.png", "128": "static/img/logo.png" }, - "permissions": [ - "storage", + "unlimitedStorage", "activeTab" ], - "optional_permissions": [ "webRequest", "webRequestBlocking", "http://*/*", "https://*/*" ], - "browser_action": { "default_icon": { "32": "static/img/icon.png" @@ -41,9 +34,8 @@ "default_title": "Taler", "default_popup": "static/popup.html" }, - "background": { "page": "static/background.html", "persistent": true } -} +}
\ No newline at end of file diff --git a/packages/taler-wallet-webextension/manifest-v3.json b/packages/taler-wallet-webextension/manifest-v3.json new file mode 100644 index 000000000..b7f7c9026 --- /dev/null +++ b/packages/taler-wallet-webextension/manifest-v3.json @@ -0,0 +1,51 @@ +{ + "manifest_version": 3, + + "name": "GNU Taler Wallet (git)", + "description": "Privacy preserving and transparent payments", + "author": "GNU Taler Developers", + "version": "0.8.1.15", + "version_name": "0.8.1-dev.15", + + "minimum_chrome_version": "88", + + "applications": { + "gecko": { + "id": "wallet@taler.net", + "strict_min_version": "57.0" + } + }, + + "icons": { + "32": "static/img/icon.png", + "128": "static/img/logo.png" + }, + + "permissions": [ + "unlimitedStorage", + "activeTab" + ], + + "optional_permissions": [ + "webRequest", + "webRequestBlocking" + ], + + "host_permissions":[ + "http://*/*", + "https://*/*" + ], + + "action": { + "default_icon": { + "32": "static/img/icon.png" + }, + "default_title": "Taler", + "default_popup": "static/popup.html" + }, + + "background": { + "page": "static/background.html", + "persistent": true + } +} diff --git a/packages/taler-wallet-webextension/pack.sh b/packages/taler-wallet-webextension/pack.sh index e762ab867..e96c5d673 100755 --- a/packages/taler-wallet-webextension/pack.sh +++ b/packages/taler-wallet-webextension/pack.sh @@ -8,15 +8,29 @@ if [[ ! -e package.json ]]; then exit 1 fi -vers_manifest=$(jq -r '.version' manifest.json) +vers_manifest=$(jq -r '.version' manifest-v2.json) zipfile="taler-wallet-webextension-${vers_manifest}.zip" TEMP_DIR=$(mktemp -d) -jq '. | .name = "GNU Taler Wallet" ' manifest.json > $TEMP_DIR/manifest.json +jq '. | .name = "GNU Taler Wallet" ' manifest-v2.json > $TEMP_DIR/manifest.json cp -r dist static $TEMP_DIR (cd $TEMP_DIR && zip -r "$zipfile" dist static manifest.json) -mkdir -p extension -mv "$TEMP_DIR/$zipfile" ./extension/ +mkdir -p extension/v2 +mv "$TEMP_DIR/$zipfile" ./extension/v2/ rm -rf $TEMP_DIR -echo "Packed webextension: extension/$zipfile" +echo "Packed webextension: extension/v2/$zipfile" + + +vers_manifest=$(jq -r '.version' manifest-v3.json) + +zipfile="taler-wallet-webextension-${vers_manifest}.zip" + +TEMP_DIR=$(mktemp -d) +jq '. | .name = "GNU Taler Wallet" ' manifest-v3.json > $TEMP_DIR/manifest.json +cp -r dist static $TEMP_DIR +(cd $TEMP_DIR && zip -r "$zipfile" dist static manifest.json) +mkdir -p extension/v3 +mv "$TEMP_DIR/$zipfile" ./extension/v3/ +rm -rf $TEMP_DIR +echo "Packed webextension: extension/v3/$zipfile" |