aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-06-16 16:17:00 -0300
committerSebastian <sebasjm@gmail.com>2021-06-16 17:17:17 -0300
commit2bb98b13153eeaa4760cbbbba36c0bd2f9eb9477 (patch)
tree59d3ca7d896b4238a81d4568bf9bedd9121f8225 /packages/taler-wallet-webextension
parentb4b0d3ff6140552b1b75c8f49e539cade3422f1c (diff)
clean and build script, for fresh tests
Diffstat (limited to 'packages/taler-wallet-webextension')
-rwxr-xr-xpackages/taler-wallet-webextension/clean_and_build.sh3
-rwxr-xr-xpackages/taler-wallet-webextension/pack.sh14
2 files changed, 9 insertions, 8 deletions
diff --git a/packages/taler-wallet-webextension/clean_and_build.sh b/packages/taler-wallet-webextension/clean_and_build.sh
new file mode 100755
index 000000000..9f9e3c5af
--- /dev/null
+++ b/packages/taler-wallet-webextension/clean_and_build.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+pnpm clean && pnpm compile && rm -rf extension/ && ./pack.sh && (cd extension/ && unzip taler*.zip)
+
diff --git a/packages/taler-wallet-webextension/pack.sh b/packages/taler-wallet-webextension/pack.sh
index df8d9d54b..d0d3f67e5 100755
--- a/packages/taler-wallet-webextension/pack.sh
+++ b/packages/taler-wallet-webextension/pack.sh
@@ -11,13 +11,11 @@ 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 ..
+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)
mkdir -p extension
-mv "./tmp/$zipfile" ./extension/
-rm -rf tmp
+mv "$TEMP_DIR/$zipfile" ./extension/
+rm -rf $TEMP_DIR
echo "Packed webextension: extension/$zipfile"