RocketChat / RC4Conferences

A set of scalable components for communities to build, manage, and run virtual conferences of any size.
https://conf.rceng.shop/conferences/c/1
24 stars 38 forks source link

Add a check for data exist in env file to avoid some redundant data gets accumulated in .env file. #79

Closed VipinDevelops closed 1 year ago

VipinDevelops commented 1 year ago

Fixes the issue of redundant data being added to the app/.env file every time the startdevenv.sh script is run.

Previously, the script appended certain data to the app/.env file every time it was run, resulting in the accumulation of duplicate data in the file.

To fix this issue, I have added a check in the script that verifies if the variables already exist in the app/.env file before appending them to the file. This ensures that only new or updated variables will be added to the file, preventing the accumulation of redundant data.

Fixes #66

debdutdeb commented 1 year ago

Why not delete the file at the beginning, if it already exists?

VipinDevelops commented 1 year ago

You mean completely clear the .env before starting script

debdutdeb commented 1 year ago

Yes

VipinDevelops commented 1 year ago

yeah sure we can do that as well so should I implement that ?

Dnouv commented 1 year ago

yeah sure we can do that as well so should I implement that ?

No, you don't. Please carefully go through my comments on the issue, this approach will not work and crash the local setup, I have explained it more in detail on the issue.

Thank you!

VipinDevelops commented 1 year ago

Sorry @Dnouv i just finished reading your comments will surley make changes to this PR like you asked can you explain a bit which approach i should take to fix this issue

that would help alot to help me get this issue fixed

Palanikannan1437 commented 1 year ago

Sorry @Dnouv i just finished reading your comments will surley make changes to this PR like you asked can you explain a bit which approach i should take to fix this issue

that would help alot to help me get this issue fixed

As @Dnouv suggested, please try to explore how the scripts work in RC4Conferences and essentially google is your best friend, on top of my mind...the sed command might help you to replace variables dynamically with some custom thought out logic 🚀

Dnouv commented 1 year ago

Hey @VipinDevelops

Are you still working on this PR? If you are, please let us know. Or we can close this PR. Thank you!

VipinDevelops commented 1 year ago

Sorry i forgot to drop a message i am working on this will soon make a PR probably on Sunday

😅kind a busy with college exams

VipinDevelops commented 1 year ago

i'll make a new PR fixing this same issue Can you please check the new approach I shared here is a link to it https://github.com/RocketChat/RC4Conferences/issues/66#issuecomment-1403410289