From 9b3dfc0ed6cda03695b802b1745ae7f85dd80c83 Mon Sep 17 00:00:00 2001 From: Jixun 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