-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update readme.md - different env in ios #281
Conversation
The use of /tmp/envfile is a bad idea, especially when there is one machine doing multiple builds on the same machine in parallel (eg. build server). IMHO it is much better to copy the correct .env.staging file to the default .env file. In this way we are not modifying system-wide files like /tmp/envfile. Do you guys agree?
@@ -139,11 +139,9 @@ Then edit the newly created scheme to make it use a different env file. From the | |||
- Click "Pre-actions", and under the plus sign select "New Run Script Action" | |||
- Where it says "Type a script or drag a script file", type: | |||
``` | |||
echo ".env.staging" > /tmp/envfile # replace .env.staging for your file | |||
cp ${PROJECT_DIR}/../.env.staging .env # replace .env.staging for your file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Shouldn't the destination be ${PROJECT_DIR}/../.env then?
- there is another reference to "/tmp/envfile" up the text
- in terms of implementation /tmp/envfile takes priority, however this is nowhere documented; I would expect either to document it or to remove it from the code entirely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The /tmp/envfile
priority is definitely confusing especially if switching to the new recommendation on a CI server where past builds populated /tmp/envfile
.
@jslowack Following the updated readme, I get |
There's a comment as part of the review of pull request lugg#281 by @danielwinkler that the build pre-action for iOS should copy the .env.staging (or whatever) file to ${PROJECT_DIR}/../.env, which turns out to be correct. This change updates the README to reflect that (and also addresses his other comment about the second reference to /tmp/envfile). @maharjanaman also mentioned on that pull request a problem with the script, and I believe that was from not having a "Provide build settings from" selection, so I added a comment about that, as well.
There's a comment as part of the review of pull request #281 by @danielwinkler that the build pre-action for iOS should copy the .env.staging (or whatever) file to ${PROJECT_DIR}/../.env, which turns out to be correct. This change updates the README to reflect that (and also addresses his other comment about the second reference to /tmp/envfile). @maharjanaman also mentioned on that pull request a problem with the script, and I believe that was from not having a "Provide build settings from" selection, so I added a comment about that, as well.
The use of /tmp/envfile is a bad idea, especially when there is one machine doing multiple builds on the same machine in parallel (eg. build server).
IMHO it is much better to copy the correct .env.staging file to the default .env file. In this way we are not modifying system-wide files like /tmp/envfile.
Do you guys agree?