grasp/publish
2019-01-28 23:53:41 +00:00

23 lines
471 B
Bash
Executable file

#!/bin/bash
set -eux
VERSION="$(git tag --points-at)"
if [[ ! -n $VERSION ]]; then
>&2 echo "Dirty build!"
VERSION="$(git rev-parse --short HEAD)"
fi
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