2019-01-06 14:15:53 -08:00
|
|
|
#!/bin/bash
|
2019-01-06 15:57:15 -08:00
|
|
|
set -eux
|
2019-01-06 14:15:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
VERSION="$(git tag --points-at)"
|
2019-01-16 13:48:45 -08:00
|
|
|
if [[ ! -n $VERSION ]]; then
|
|
|
|
>&2 echo "Dirty build!"
|
|
|
|
VERSION="$(git rev-parse --short HEAD)"
|
|
|
|
fi
|
2019-01-06 14:15:53 -08:00
|
|
|
|
2019-01-06 15:14:03 -08:00
|
|
|
|
2019-01-28 15:42:12 -08:00
|
|
|
function rebuild {
|
|
|
|
local res="$1"
|
2020-02-08 09:12:37 -08:00
|
|
|
local browser="$2"
|
|
|
|
./build --target "$browser" --release --lint
|
|
|
|
zip -r -j "$res" dist/*
|
2019-01-28 15:42:12 -08:00
|
|
|
unzip -l "$res"
|
|
|
|
}
|
|
|
|
|
|
|
|
for browser in "chrome" "firefox"; do
|
2020-02-08 09:12:37 -08:00
|
|
|
rebuild "grasp-$VERSION-$browser.zip" "$browser"
|
2019-01-28 15:42:12 -08:00
|
|
|
done
|