This commit is contained in:
th committed 2026-04-08 14:16:07 +02:00
1 parent e0fca064ae
commit 60c9d56c05
6 files changed
+160 -7

No files matched your search

Executable
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
# Build hyprcrd distribution ZIP
set -e
cd "$(dirname "$0")"
VERSION=$(grep "APP_VERSION" config.php | grep -oP "'[^']+'" | tail -1 | tr -d "'" || echo "dev")
DIST="hyprcrd-${VERSION}.zip"
# Rebuild Tailwind if CLI exists
if [ -x ./tailwindcss ]; then
echo "Building Tailwind CSS..."
./tailwindcss --input public/css/tailwind.css --output public/css/tailwind.out.css --content "public/index.php,public/js/**/*.js" --minify
fi
echo "Creating ${DIST}..."
zip -r "$DIST" \
config.php \
Dockerfile \
docker-entrypoint.sh \
README.md \
.htaccess \
.gitignore \
src/ \
public/ \
-x "public/uploads/*" \
-x "public/uploads/.gitkeep" \
-x "public/css/tailwind.css"
# Add empty dirs with gitkeep
mkdir -p /tmp/hyprcrd-dist/data
mkdir -p /tmp/hyprcrd-dist/public/uploads
touch /tmp/hyprcrd-dist/data/.gitkeep
touch /tmp/hyprcrd-dist/public/uploads/.gitkeep
cd /tmp/hyprcrd-dist
zip -r "$OLDPWD/$DIST" data/.gitkeep public/uploads/.gitkeep
cd "$OLDPWD"
rm -rf /tmp/hyprcrd-dist
echo "Done: ${DIST} ($(du -h "$DIST" | cut -f1))"