wallet-core/packages/taler-wallet-webextension/pack.sh

23 lines
584 B
Bash
Raw Normal View History

2020-08-10 18:49:23 +02:00
#!/usr/bin/env bash
# This file is in the public domain.
2020-08-10 18:49:23 +02:00
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
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
mv "$TEMP_DIR/$zipfile" ./extension/
rm -rf $TEMP_DIR
2020-11-25 18:27:58 +01:00
echo "Packed webextension: extension/$zipfile"