summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/pack.sh
blob: df8d9d54bbbe76407df9b646a4f1f5e27c527d98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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)

zipfile="taler-wallet-webextension-${vers_manifest}.zip"

mkdir tmp
jq '. | .name = "GNU Taler Wallet" ' manifest.json > tmp/manifest.json
cp -r dist static tmp/
cd tmp
zip -r "$zipfile" dist static manifest.json
cd ..
mkdir -p extension
mv "./tmp/$zipfile" ./extension/
rm -rf tmp
echo "Packed webextension: extension/$zipfile"