2020-08-10 18:49:23 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
if [[ ! -e package.json ]]; then
|
|
|
|
echo "Please run this from the root of the repo.">&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
vers_manifest=$(jq -r '.version' manifest.json)
|
|
|
|
|
2020-11-25 16:04:07 +01:00
|
|
|
zipfile="taler-wallet-webextension-${vers_manifest}.zip"
|
2020-08-10 18:49:23 +02:00
|
|
|
|
2021-06-16 21:17:00 +02:00
|
|
|
TEMP_DIR=$(mktemp -d)
|
|
|
|
jq '. | .name = "GNU Taler Wallet" ' manifest.json > $TEMP_DIR/manifest.json
|
|
|
|
cp -r dist static $TEMP_DIR
|
|
|
|
(cd $TEMP_DIR && zip -r "$zipfile" dist static manifest.json)
|
2020-11-25 18:27:58 +01:00
|
|
|
mkdir -p extension
|
2021-06-16 21:17:00 +02:00
|
|
|
mv "$TEMP_DIR/$zipfile" ./extension/
|
|
|
|
rm -rf $TEMP_DIR
|
2020-11-25 18:27:58 +01:00
|
|
|
echo "Packed webextension: extension/$zipfile"
|