only remove node_modules of dashboard

This commit is contained in:
Girish Ramakrishnan
2023-02-25 00:38:35 +01:00
parent f807ba5dde
commit 6f9529fecd
+2 -8
View File
@@ -50,16 +50,10 @@ echo "==> Checking out code box version [${box_version}] into ${bundle_dir}"
(cd "${SOURCE_DIR}" && git archive --format=tar ${box_version} | (cd "${bundle_dir}" && tar xf -))
echo "${version}" > "${bundle_dir}/VERSION"
echo "==> Installing modules for dashboard asset generation"
(cd "${bundle_dir}/dashboard" && npm install --omit=dev)
echo "==> Building dashboard assets"
(cd "${bundle_dir}/dashboard" && npm install --omit=dev)
(cd "${bundle_dir}/dashboard" && ./node_modules/.bin/gulp --revision ${box_version})
echo "==> Move built dashboard assets into destination"
mv "${bundle_dir}/dashboard/dist" "${bundle_dir}/dashboard.dist"
rm -rf "${bundle_dir}/dashboard"
mv "${bundle_dir}/dashboard.dist" "${bundle_dir}/dashboard"
rm -rf "${bundle_dir}/dashboard/node_modules"
echo "==> Installing toplevel node modules"
(cd "${bundle_dir}" && npm install --omit=dev --no-optional)