design improvements, stabilize everything, update readme
This commit is contained in:
parent
48736645c5
commit
0ceb0b61b4
8 changed files with 979 additions and 511 deletions
|
@ -17,15 +17,15 @@ if ! command -v bun &> /dev/null; then
|
|||
fi
|
||||
|
||||
# Check if filename to be created already exists
|
||||
if [ -f "BeeSrv-$version.zip" ]; then
|
||||
echo "[i] BeeSrv-$version.zip already exists, would you like to overwrite it? (y/n)"
|
||||
if [ -f "BeeSrv-$version.zip" ] || [ -f "BeeSrv-$version-debug.zip" ]; then
|
||||
echo "[i] BeeSrv zip files already exist, would you like to overwrite them? (y/n)"
|
||||
read overwrite
|
||||
if [ "$overwrite" != "y" ]; then
|
||||
echo "[!] Aborting..."
|
||||
exit 1
|
||||
else
|
||||
rm -rf BeeSrv-$version.zip
|
||||
echo "[✔] Overwriting BeeSrv-$version.zip..."
|
||||
rm -rf BeeSrv-$version.zip BeeSrv-$version-debug.zip
|
||||
echo "[✔] Overwriting existing zip files..."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -46,9 +46,9 @@ cp -r module tmp
|
|||
echo "[✔] Created working directory"
|
||||
|
||||
# Clean any unnecessary files
|
||||
rm -rf tmp/module/webroot/dist
|
||||
rm -rf tmp/module/webroot/.gitignore
|
||||
rm -rf tmp/module/webroot/package-lock.json
|
||||
rm -rf tmp/webroot/dist
|
||||
rm -rf tmp/webroot/.gitignore
|
||||
rm -rf tmp/webroot/package-lock.json
|
||||
echo "[✔] Completed cleanup"
|
||||
|
||||
# Build webroot
|
||||
|
@ -83,15 +83,23 @@ echo "[✔] Moved built files to webroot"
|
|||
rm -rf webroot/dist
|
||||
echo "[✔] Completed cleanup"
|
||||
|
||||
# Create zip
|
||||
echo "[i] Creating zip..."
|
||||
echo "[i] Creating debug zip..."
|
||||
zip -r ../BeeSrv-$version-debug.zip *
|
||||
echo "[✔] Created debug zip"
|
||||
|
||||
echo "[i] Removing eruda scripts for production version..."
|
||||
sed -i '/<script src="https:\/\/cdn\.jsdelivr\.net\/npm\/eruda"><\/script>/d' webroot/index.html
|
||||
sed -i '/<script>eruda\.init();<\/script>/d' webroot/index.html
|
||||
echo "[✔] Removed eruda scripts"
|
||||
|
||||
echo "[i] Creating production zip..."
|
||||
zip -r ../BeeSrv-$version.zip *
|
||||
cd ..
|
||||
echo "[✔] Created zip"
|
||||
echo "[✔] Created production zip"
|
||||
|
||||
# Clean up
|
||||
rm -rf tmp
|
||||
echo "[✔] Completed cleanup"
|
||||
|
||||
echo ""
|
||||
echo "BeeSrv-$version.zip created successfully!"
|
||||
echo "BeeSrv-$version.zip and BeeSrv-$version-debug.zip created successfully!"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue