This repository was archived by the owner on May 23, 2025. It is now read-only.
Open
Conversation
shyim
reviewed
Nov 8, 2022
|
|
||
| # dot env dump feature introduced in 6.4.16, we ensure that core >= 6.4.16 is enabled before dumping env | ||
| if (composer show -f json -N shopware/core ^6.4.16 2>&- || echo '{}') | jq '.name' | grep -q 'shopware/core'; then | ||
| ./bin/ci dotenv:dump ${APP_ENV} |
Contributor
There was a problem hiding this comment.
Do we really need that? You could just rm *.env 🤔
You should manage them in variables.env in this yaml?
Author
There was a problem hiding this comment.
This is covering the case where you are versioning a default .env file in your Shopware project with generic variables which are the same everywhere (platform.sh or not) and you want to deploy it without performance lost in production.
I just realized that there is no .env in the default template but only a .env.dist, so as you pointed out this is not really needed here in the standard configuration.
Maybe we could add it commented as an available helper for project with a versionned .env file ? Otherwise we can close the PR
Regards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello
Here is a change to dump the .env file as .env.local.php during the platform sh build hook and remove the overhead introduced by parsing the env files stack in production.
To ensure the retro-compatibility with the previous Shopware versions the dump is executed only when Shopware >= 6.4.16.0 is enabled in composer vendors