mirror of
https://git.unlock-music.dev/um/web.git
synced 2025-07-07 06:52:09 +08:00
ci: initial experiment with ci build
This commit is contained in:
23
scripts/build-and-package.sh
Executable file
23
scripts/build-and-package.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/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}"
|
Reference in New Issue
Block a user