svenluijten / forge-cli

🔥 A command line utility to interact with your Laravel Forge servers, sites, and more.
https://svenluijten.com
MIT License
64 stars 14 forks source link

Provider overwrites for env files #34

Closed thoresuenert closed 3 years ago

thoresuenert commented 5 years ago

When you use forge-cli in ci/cd pipelines for deployment of review apps its hard to update the env file accordingly in shell land.

We come up with an idea to provider overwrites to command as follows:

forge update:env server site --file=local/.env  --overwrites=DB_DATABASE:test,DB_USERNAME:test-user

Which will grab the env file an overwrite the given variables.

svenluijten commented 5 years ago

What about first fetching the contents of the .env file (with get:env), saving that to a file (or in memory), altering it, and using update:env to replace the entire .env file?

I feel like adding something like --overwrites would muddy up this package, which is effectively just a CLI for the API.