mirror of
https://git.unlock-music.dev/um/web.git
synced 2024-12-29 23:15:03 +08:00
24 lines
402 B
Bash
24 lines
402 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -ex
|
||
|
|
||
|
cd "$(git rev-parse --show-toplevel)"
|
||
|
|
||
|
VERSION="$(jq -r ".version" <package.json)"
|
||
|
DIST_NAME="um-web.$1.${VERSION}"
|
||
|
|
||
|
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}"
|