Skip to content

Commit

Permalink
update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
saikrishna321 committed Apr 30, 2024
1 parent 2bd358d commit b0619b0
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions buildAndCopyWeb.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
#!/bin/bash
if [ -d "dashboard-frontend" ]; then
# shellcheck disable=SC2164
cd dashboard-frontend
npm install --force
npm run build
# shellcheck disable=SC2103
cd ..
rm -rf src/public
mkdir src/public
cp -R ./dashboard-frontend/dist/* src/public/
echo "Build date - `date` by `whoami`" > src/public/version.txt
if [ -e "package.json" ]; then
# shellcheck disable=SC2164
echo 'Building dashboard-frontend...'
npm install --force
npm run build
# shellcheck disable=SC2103
cd ..
rm -rf src/public
mkdir src/public
cp -R ./dashboard-frontend/dist/* src/public/
echo "Build date - `date` by `whoami`" > src/public/version.txt
else
echo "Directory dashboard-frontend exists but empty."
fi
else
echo "Directory dashboard-frontend does not exist."
fi

0 comments on commit b0619b0

Please sign in to comment.