initial commit
This commit is contained in:
24
deploy-assets-prod.sh
Executable file
24
deploy-assets-prod.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/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=prod/' "$ENV_FILE"
|
||||
else
|
||||
# BSD sed (macOS)
|
||||
sed -i '' 's/^APP_ENV=.*/APP_ENV=prod/' "$ENV_FILE"
|
||||
fi
|
||||
else
|
||||
echo "APP_ENV=prod" >> "$ENV_FILE"
|
||||
fi
|
||||
|
||||
rm -rf ./var/cache/dev
|
||||
rm -rf ./var/cache/prod
|
||||
rm -rf ./var/log/*.log
|
||||
php bin/console tailwind:build --minify
|
||||
php bin/console asset-map:compile
|
||||
Reference in New Issue
Block a user