Open alnutile opened 9 years ago
Just want to make sure I understand all the edge cases correctly. They could affect how other command (envdeployer:push {target}
) works
Case 1:
Suppose my local .env
is:
#@dev=foo_bar_dev
#@stage=foo_bar_stage
FOO_BAR=foo_bar_local
dev .env
is:
FOO_BAR=foo_bar_dev
After running the command envdeployer:get dev
, my new local .env
will be:
#@dev=foo_bar_dev
#@stage=foo_bar_stage
#@dev <--------- now we have another tag @dev
FOO_BAR=foo_bar_dev
Case 2:
Suppose my local .env
is:
FOO_BAR=foo_bar_local
dev .env
is:
FOO_BAR=foo_bar_dev
stage .env
is:
FOO_BAR=foo_bar_stage
After running 2 commands one after the other:
php artisan envdeployer:get dev
php artisan envdeployer:get stage
New local .env
will be:
#@dev <---- should we keep the previous tag that comes from the previous command?
#@stage
FOO_BAR=foo_bar_stage
would end up as
#@dev=foo_bar_dev <-- you already have the tag
#@stage=foo_bar_stage
FOO_BAR=foo_bar_dev
If you did not have the tag it would be added
This would be
#@dev=foo_bar_dev
#@stage=foo_bar_stage
FOO_BAR=foo_bar_local <-- this is your local
Either of these when pushed to stage or dev on those systems the .env would look like
FOO_BAR=foo_bar_stage <-- this is stage
we remove all the #@
let me know if you want to slack later
User should be able to type
And get the values from dev and merge them into their local. For example
would become
If dev has a value local does not have that would be pulled in
Add #@dev helps us to later preserve this if stage has it as well etc.