From 53a5701a3b1c8559ea98ce84342b0e864a7a0a42 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Mon, 28 Jan 2019 23:42:12 +0000 Subject: [PATCH] multibuild publish script --- publish | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/publish b/publish index 7d5fb35..4082874 100755 --- a/publish +++ b/publish @@ -7,10 +7,16 @@ if [[ ! -n $VERSION ]]; then >&2 echo "Dirty build!" VERSION="$(git rev-parse --short HEAD)" fi - -OUT="grasp-$VERSION.zip" -npm run build -zip -r -j "$OUT" build/* -unzip -l "$OUT" +function rebuild { + local res="$1" + npm run build + zip -r -j "$res" build/* + unzip -l "$res" +} + +for browser in "chrome" "firefox"; do + TARGET="$browser" rebuild "grasp-$VERSION-$browser.zip" + TARGET="$browser" ANY_HOST='yes' rebuild "grasp-$VERSION-anyhost-$browser.zip" +done