2022-11-26 19:59:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
|
|
|
|
|
|
VERSION="$(jq -r ".version" <package.json)"
|
2022-11-26 20:02:52 +00:00
|
|
|
DIST_NAME="um-web.$1.v${VERSION}"
|
2022-11-26 19:59:26 +00:00
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
"modern") npm run build -- --modern ;;
|
|
|
|
"legacy") npm run build ;;
|
|
|
|
"extension") npm run make-extension ;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "Unknown command: $1"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
mv dist "${DIST_NAME}"
|
|
|
|
zip -rJ9 "${DIST_NAME}.zip" "${DIST_NAME}"
|
|
|
|
rm -rf "${DIST_NAME}"
|