Files
ec-architektur/deploy-assets-dev.sh
Murat Özkorkmaz abb3cbc1bd initial commit
2025-10-08 15:57:29 +02:00

24 lines
501 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ENV_FILE=".env"
if grep -q '^APP_ENV=' "$ENV_FILE"; then
# Unterschiedliche sed-Varianten behandeln
if sed --version >/dev/null 2>&1; then
# GNU sed
sed -i 's/^APP_ENV=.*/APP_ENV=dev/' "$ENV_FILE"
else
# BSD sed (macOS)
sed -i '' 's/^APP_ENV=.*/APP_ENV=dev/' "$ENV_FILE"
fi
else
echo "APP_ENV=dev" >> "$ENV_FILE"
fi
rm -rf ./public/assets/
php bin/console cache:clear
php bin/console asset-map:compile
php bin/console tailwind:build