#!/usr/bin/sh

NAME=$(grep "name" package.json | grep -oP '(?<=: ")[^"]+')
VERSION=$(grep "version" package.json | grep -oP '(?<=: ")[^"]+')
BROWSERS=("chrome" "firefox")

for BROWSER in "${BROWSERS[@]}"; do
	pnpm build:$BROWSER
	python -m zipfile -c releases/$NAME-$BROWSER@v$VERSION /dist
done
