-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: Use .env.example files from custom plugins #5003
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
Conversation
|
@focusaurus I think the "testing" portion of the PR template refers to how I would be able to test it to ensure it works |
|
OK @zenweasel I updated the description to have that info too |
brent-hoover
left a comment
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.
When I run bin/setup on this branch on OSX I am getting the following error:
»» ./bin/setup
xargs: illegal option -- -
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
[-L number] [-n number [-x]] [-P maxprocs] [-s size]
[utility [argument ...]]
|
Ah crap. That's a GNU xargs vs BSD xargs thing. BSD xargs doesn't support |
714392d to
09f1fc0
Compare
|
OK I removed the |
|
IMHO I think generally we want to avoid doing a |
|
So I if I have a commented out line in one of my |
|
|
Ah, OK it's not comment lines, it's blank lines which get carried forward. |
- Combine the main .env.example file with any .env.example files from custom plugins during setup - ignore blank lines - also format with shfmt - also fix one shellcheck lint error Signed-off-by: Peter Lyons <[email protected]>
09f1fc0 to
e0512ed
Compare
|
OK @zenweasel I think the latest change should prevent blank line propagation. Sorry about the force pushes but I didn't want to change process mid-PR. |
|
Works great. Great work. 👍 |
feat: Use .env.example files from custom plugins Signed-off-by: Nat Hamilton <[email protected]>
files from custom plugins during setup
.env.examplefilesImpact: minor
Type: feature
Issue
Sometimes reaction custom plugins need environment variable settings, and need to provide examples. Previously only the main reaction
.env.examplefile was used to initially populate the user's.envfile. Any settings from custom plugins would require a documented manual process to initially setup.Solution
Search the
imports/plugins/customdirectory for any files named.env.exampleand incorporate those into the main.env.Breaking changes
The script has always avoided overwriting any values that already exist in the file, and that behavior is retained.
Testing
I locally tested a few scenarios
.env.examplefiles.env.examplefiles.env.examplein adocssubdireHow to test this yourself
.env.examplefiles in your directory tree including the reaction project directory and anywhere underimports/plugins/customKEY=valuevars and commented out linesbin/setup.envfile and make sure it has the values you expect