Skip to content

Instantly share code, notes, and snippets.

@cvergne
Created November 19, 2018 14:57
Show Gist options
  • Save cvergne/8911eef523d7547199403bf763cfa131 to your computer and use it in GitHub Desktop.
Save cvergne/8911eef523d7547199403bf763cfa131 to your computer and use it in GitHub Desktop.
Symfony .env migration
#!/bin/bash
set -e # stop on error
set -x # print commands
# cf. https://symfony.com/blog/improvements-to-the-handling-of-env-files-for-all-symfony-versions
mv .env .env.local
mv .env.dist .env
sed -i '' 's/\.env/\.env\.*/g' .gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment