From fcbd9fc1f025edf0e6ffdde8c893062a1940b7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Sat, 26 Nov 2022 20:11:05 +0000 Subject: [PATCH] fix: keep dist after legacy has built --- scripts/build-and-package.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/build-and-package.sh b/scripts/build-and-package.sh index b947db5..72c16e7 100755 --- a/scripts/build-and-package.sh +++ b/scripts/build-and-package.sh @@ -13,11 +13,17 @@ case "$1" in "extension") npm run make-extension ;; *) - echo "Unknown command: $1" - exit 1 - ;; + echo "Unknown command: $1" + exit 1 + ;; esac mv dist "${DIST_NAME}" zip -rJ9 "${DIST_NAME}.zip" "${DIST_NAME}" -rm -rf "${DIST_NAME}" + +if [ "$1" == "legacy" ]; then + # For upcoming extension build + mv "${DIST_NAME}" dist +else + rm -rf "${DIST_NAME}" +fi